Skip to content

Commit 1f1491b

Browse files
committed
Merge branch 'humble-devel' of https://github.com/CoreSenseEU/CoreSense4Home into humble-devel
2 parents d81b385 + fbcc9a4 commit 1f1491b

File tree

5 files changed

+55
-19
lines changed

5 files changed

+55
-19
lines changed

bt_nodes/arm/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ find_package(tf2_ros REQUIRED)
1616
find_package(geometry_msgs REQUIRED)
1717
find_package(sensor_msgs REQUIRED)
1818
find_package(play_motion2_msgs REQUIRED)
19-
# uncomment the following section in order to fill in
19+
find_package(Eigen3 REQUIRED)
20+
find_package(srdfdom REQUIRED)
21+
find_package(eigen_stl_containers REQUIRED)
22+
find_package(geometric_shapes REQUIRED)
23+
find_package(moveit_core REQUIRED)
24+
find_package(tf2_geometry_msgs REQUIRED)
25+
include_directories(${EIGEN3_INCLUDE_DIRS})
2026
# further dependencies manually.
2127
# find_package(<dependency> REQUIRED)
2228

@@ -32,8 +38,15 @@ set(dependencies
3238
geometry_msgs
3339
sensor_msgs
3440
play_motion2_msgs
41+
srdfdom
42+
eigen_stl_containers
43+
geometric_shapes
44+
moveit_core
45+
tf2_geometry_msgs
46+
Eigen3
3547
)
3648

49+
3750
include_directories(include)
3851

3952
add_library(pick_bt_node SHARED src/manipulation/pick_object.cpp)

bt_nodes/hri/src/hri/dialog/get_guest_info.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ void GetGuestInfo::on_result()
117117
std_msgs::msg::String fact_msg;
118118

119119
// Delete attending fact
120-
fact_msg.data = "robot1 oro:attends " + guest_id_;
121-
kb_publisher_->publish(fact_msg);
120+
if (!guest_id_.empty()) {
121+
fact_msg.data = "robot1 oro:attends " + guest_id_;
122+
kb_publisher_->publish(fact_msg);
123+
}
122124

123125
setStatus(BT::NodeStatus::SUCCESS);
124126
}

bt_nodes/hri/src/hri/dialog/store_guest_info.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,26 @@ std::string obtain_guest_id(const std::string & json)
7575
return "guest" + std::to_string(max_id + 1);
7676
}
7777

78+
static std::string escape_turtle_literal(std::string s)
79+
{
80+
// 1) Escape backslashes
81+
for (size_t pos = 0; (pos = s.find('\\', pos)) != std::string::npos; pos += 2) {
82+
s.replace(pos, 1, "\\\\");
83+
}
84+
85+
// 2) Escape double quotes
86+
for (size_t pos = 0; (pos = s.find('"', pos)) != std::string::npos; pos += 2) {
87+
s.replace(pos, 1, "\\\"");
88+
}
89+
90+
// 3) Optional: normalize newlines (depends on parser strictness)
91+
for (size_t pos = 0; (pos = s.find('\n', pos)) != std::string::npos; pos += 2) {
92+
s.replace(pos, 1, "\\n");
93+
}
94+
95+
return s;
96+
}
97+
7898
void StoreGuestInfo::on_result()
7999
{
80100
RCLCPP_DEBUG(node_->get_logger(), "[StoreGuestInfo] result received");
@@ -101,6 +121,7 @@ void StoreGuestInfo::on_result()
101121
kb_publisher_->publish(fact_msg);
102122

103123
if (!guest_description_.empty()) {
124+
guest_description_ = escape_turtle_literal(guest_description_);
104125
fact_msg.data = guest_id + " oro:description \"" + guest_description_ + "\"";
105126
kb_publisher_->publish(fact_msg);
106127
}

robocup_bringup/launch/dialog.launch.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,13 @@ def generate_launch_description():
2727
# package_dir = get_package_share_directory('robocup_bringup')
2828
# llama_dir = get_package_share_directory('llama_bringup')
2929
whisper_dir = get_package_share_directory('whisper_bringup')
30+
kb_dir = get_package_share_directory('knowledge_core')
3031
# audio_common_dir = get_package_share_directory('audio_common')
3132

3233
# Configuration Variables
3334
model_repo = LaunchConfiguration('model_repo')
3435
model_filename = LaunchConfiguration('model_filename')
3536

36-
declare_model_repo_cmd = DeclareLaunchArgument(
37-
'model_repo', default_value='ggerganov/whisper.cpp',
38-
description='Hugging Face model repo')
39-
40-
declare_model_filename_cmd = DeclareLaunchArgument(
41-
'model_filename', default_value='ggml-large-v3-q5_0.bin',
42-
description='Hugging Face model filename')
43-
4437
# Actions
4538
llama_cmd = create_llama_launch(
4639
n_ctx=2048,
@@ -87,6 +80,12 @@ def generate_launch_description():
8780
)
8881
)
8982

83+
kb_cmd = IncludeLaunchDescription(
84+
PythonLaunchDescriptionSource(
85+
os.path.join(kb_dir, 'launch', 'knowledge_core.launch.py')
86+
)
87+
)
88+
9089
audio_common_tts_node = Node(
9190
package='tts_ros',
9291
executable='tts_node',
@@ -112,13 +111,13 @@ def generate_launch_description():
112111
)
113112

114113
ld = LaunchDescription()
115-
ld.add_action(declare_model_repo_cmd)
116-
ld.add_action(declare_model_filename_cmd)
117-
#ld.add_action(whisper_cmd)
118-
#ld.add_action(llama_cmd)
114+
115+
ld.add_action(whisper_cmd)
119116
ld.add_action(llava_cmd)
120117
ld.add_action(audio_common_tts_node)
121118
ld.add_action(audio_common_player_node)
119+
ld.add_action(kb_cmd)
120+
122121
#ld.add_action(music_player_node)
123122

124123
return ld

robocup_bringup/launch/receptionist_dependencies.launch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def generate_launch_description():
4141

4242
manipulation_server = IncludeLaunchDescription(
4343
PythonLaunchDescriptionSource(
44-
os.path.join(manipulation_dir, 'launch', 'server.launch.py')
44+
os.path.join(manipulation_dir, 'launch', 'simple_server.launch.py')
4545
)
4646
)
4747

@@ -58,12 +58,13 @@ def generate_launch_description():
5858
),
5959
launch_arguments={
6060
# 'namespace': 'perception_system',
61+
'use_3d': 'True',
6162
'model': 'yolov8n.pt',
6263
'input_image_topic': '/head_front_camera/rgb/image_raw',
6364
'input_depth_topic': '/head_front_camera/depth/image_raw',
6465
'input_depth_info_topic': '/head_front_camera/depth/camera_info',
6566
'depth_image_units_divisor': '1000', # 1 for simulation, 1000 real
66-
'target_frame': 'camera_color_optical_frame',
67+
'target_frame': 'head_front_camera_optical_frame',
6768
'threshold': '0.5'
6869
}.items()
6970
)
@@ -81,7 +82,7 @@ def generate_launch_description():
8182
launch_arguments={
8283
'rviz': 'True',
8384
# 'map': package_dir + '/maps/robocup_arena_1.yaml', # ARENA C
84-
'map': package_dir + '/maps/robocup_arena_2.yaml', # ARENA B
85+
'map': package_dir + '/maps/apartamento_leon_gimp_con_mesa_tv.yaml', # ARENA B
8586
'params_file': package_dir +
8687
'/config/receptionist/tiago_nav_params.yaml',
8788
'slam_params_file': package_dir +
@@ -95,7 +96,7 @@ def generate_launch_description():
9596
ld.add_action(dialog)
9697
ld.add_action(yolo3d)
9798
ld.add_action(real_time)
98-
ld.add_action(move_group)
99+
#ld.add_action(move_group)
99100
ld.add_action(manipulation_server)
100101

101102
return ld

0 commit comments

Comments
 (0)