Skip to content

Commit be0b8ea

Browse files
committed
fix merge
2 parents 1fe94e5 + 46fffdc commit be0b8ea

5 files changed

Lines changed: 39 additions & 17 deletions

File tree

bt_nodes/configuration/src/configuration/Setup_gpsr.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ BT::NodeStatus SetupGPSR::tick()
7676
plugins.push_back("sleep_bt_node");
7777
plugins.push_back("count_people_bt_node");
7878
plugins.push_back("set_blackboard_int_bt_node");
79+
plugins.push_back("check_policy_bt_node");
80+
plugins.push_back("move_along_axis_bt_node");
81+
plugins.push_back("switch_yolo_model_bt_node");
82+
plugins.push_back("remove_string_prefix_bt_node");
83+
plugins.push_back("set_persistent_id_bt_node");
7984

8085
setOutput("plugins", plugins);
8186

bt_nodes/hri/src/hri/dialog/Query.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,17 @@ void Query::on_tick()
4747
std::string text_;
4848
getInput("text", text_);
4949
getInput("intention", intention_);
50-
std::string prompt_ = "Given the sentence \"" + text_ + "\", extract the " + intention_ +
50+
51+
std::string prompt_ = "";
52+
53+
if(intention_.empty()){
54+
prompt_= "You are a robot named Tiago who is participating in the Robocup with the Gentlebots team from Spain, made up of the Rey Juan Carlos University of Madrid and the University of León. Answer the following question: \"" + text_ + "\"";
55+
}else{
56+
prompt_ = "Given the sentence \"" + text_ + "\", extract the " + intention_ +
5157
" from the sentence and return "
5258
"it with the following JSON format:\n" +
5359
"{\n\t\"intention\": \"word extracted in the sentence\"\n}";
60+
}
5461
goal_.prompt = prompt_;
5562
goal_.reset = true;
5663
goal_.sampling_config.temp = 0.0;

bt_nodes/perception/include/perception/count_people.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CountPeople : public BT::ActionNodeBase
6161
BT::InputPort<int>("input_num_person"),
6262

6363
BT::OutputPort<std::vector<std::string>>("frames"),
64-
BT::OutputPort<int>("num_person")});
64+
BT::OutputPort<std::string>("num_person")});
6565
}
6666

6767
private:

bt_nodes/perception/src/perception/count_people.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ BT::NodeStatus CountPeople::tick()
7878
RCLCPP_INFO(node_->get_logger(), "CountPeople idle");
7979
}
8080

81+
RCLCPP_INFO(node_->get_logger(), "[CountPeople] color %s", color_);
82+
RCLCPP_INFO(node_->get_logger(), "[CountPeople] pose %s", pose_);
83+
RCLCPP_INFO(node_->get_logger(), "[CountPeople] color %s", gesture_);
8184
RCLCPP_INFO(node_->get_logger(), "CountPeople ticked");
8285
pl::getInstance(node_)->set_interest("person", true);
8386
pl::getInstance(node_)->update(35);
@@ -96,8 +99,11 @@ BT::NodeStatus CountPeople::tick()
9699
bool removed = false;
97100

98101
if (detection.score > threshold_) {
102+
RCLCPP_INFO(node_->get_logger(), "[CountPeople] threshold okey");
103+
99104
// Color filtering
100105
if (color_ != "none") {
106+
RCLCPP_INFO(node_->get_logger(), "[CountPeople] Count by color");
101107
auto const detection_id_colors = perception_system::getHSVFromUniqueID(
102108
detection.color_person);
103109
std::string lower_color = "lower_" + color_;
@@ -135,6 +141,7 @@ BT::NodeStatus CountPeople::tick()
135141

136142
// gesture filtering
137143
if (gesture_ != "unknown" && !removed) {
144+
RCLCPP_INFO(node_->get_logger(), "[CountPeople] Count by gesture");
138145
if (std::find(
139146
gestures_[gesture_].begin(), gestures_[gesture_].end(),
140147
detection.pointing_direction) != gestures_[gesture_].end())
@@ -153,6 +160,7 @@ BT::NodeStatus CountPeople::tick()
153160

154161
// pose filtering
155162
if (pose_ != "unknown" && !removed) {
163+
RCLCPP_INFO(node_->get_logger(), "[CountPeople] Count by pose");
156164
if (pose_names_[detection.body_pose] == pose_) {
157165
RCLCPP_DEBUG(
158166
node_->get_logger(), "[IsDetected] Detection %s is %s",
@@ -182,7 +190,9 @@ BT::NodeStatus CountPeople::tick()
182190
// return BT::NodeStatus::SUCCESS;
183191
}
184192

185-
setOutput("num_person", prev_num_person + num_entities);
193+
auto result = std::to_string(prev_num_person + num_entities);
194+
195+
setOutput("num_person", result);
186196

187197
RCLCPP_INFO(node_->get_logger(), "[CountPeople] %d people detected", num_entities);
188198

robocup_bringup/launch/gpsr_dependencies.launch.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def generate_launch_description():
4949

5050
manipulation_server = IncludeLaunchDescription(
5151
PythonLaunchDescriptionSource(
52-
os.path.join(manipulation_dir, 'launch', 'server.launch.py')
52+
os.path.join(manipulation_dir, 'launch', 'simple_server.launch.py')
5353
)
5454
)
5555

@@ -62,16 +62,16 @@ def generate_launch_description():
6262

6363
yolo3d = IncludeLaunchDescription(
6464
PythonLaunchDescriptionSource(
65-
os.path.join(yolo3d_dir, 'launch', 'yolo_3d.launch.py')
65+
os.path.join(yolo3d_dir, 'launch', 'yolo.launch.py')
6666
),
6767
launch_arguments={
6868
# 'namespace': 'perception_system',
69-
'model': 'yolov8n-pose.pt',
69+
'model': 'yolo11n.pt',
7070
'input_image_topic': '/head_front_camera/rgb/image_raw',
7171
'input_depth_topic': '/head_front_camera/depth/image_raw',
72-
'input_depth_info_topic': '/head_front_camera/depth/camera_info',
73-
'depth_image_units_divisor': '1000', # 1 for simulation, 1000 in real robot
74-
'target_frame': 'head_front_camera_rgb_optical_frame',
72+
'input_depth_info_topic': '/head_front_camera/rgb/camera_info',
73+
'depth_image_units_divisor': '1000', # 1 for simulation, 1000 real
74+
'target_frame': 'head_front_camera_color_optical_frame',
7575
'threshold': '0.5'
7676
}.items()
7777
)
@@ -82,13 +82,13 @@ def generate_launch_description():
8282
),
8383
launch_arguments={
8484
'rviz': 'True',
85-
'mode': 'amcl',
86-
'params_file': package_dir + '/config/gpsr/tiago_nav_params.yaml',
87-
'slam_params_file': package_dir + '/config/gpsr/tiago_nav_follow_params.yaml',
88-
'map': os.path.join(
89-
package_dir,
90-
'maps',
91-
'robocup_arena_1.yaml'),
85+
# 'map': package_dir + '/maps/robocup_arena_1.yaml', # ARENA C
86+
'map': package_dir + '/maps/apartamento_leon_gimp_con_mesa_tv.yaml', # ARENA B
87+
'params_file': package_dir +
88+
'/config/receptionist/tiago_nav_params.yaml',
89+
'slam_params_file': package_dir +
90+
'/config/receptionist/tiago_nav_follow_params.yaml',
91+
'nav_mode': 'amcl'
9292
}.items()
9393
)
9494

@@ -103,7 +103,7 @@ def generate_launch_description():
103103
ld.add_action(dialog)
104104
ld.add_action(yolo3d)
105105
ld.add_action(real_time)
106-
ld.add_action(move_group)
106+
# ld.add_action(move_group)
107107
ld.add_action(manipulation_server)
108108
ld.add_action(gpsr)
109109

0 commit comments

Comments
 (0)