Skip to content

r2_behavior: ROS 2 declarations

Direct rclpy publisher/subscriber arguments use type, name, callback/QoS ordering. Compatibility wrapper calls include the node as their first argument. Service arguments identify the service type and name. Namespace/remapping and computed names must be resolved from the active launch configuration.

scripts/animation.py

Source: head-ros-nodes/ros/r2_behavior/scripts/animation.py

Kind Arguments in source order Line
Publisher self.node, SetExpression, '/hr/animation/set_expression', depth=10 201
Subscription self.node, SetExpression, '/hr/animation/set_expression', self.expresion_callback, depth=10 202
Publisher self.node, SetAnimation, '/hr/animation/set_animation', depth=10 205
Publisher self.node, SetAnimation, '/hr/animation/set_arm_animation', depth=10 206
Service client self.node, srv.RunByName, '/hr/control/performances/background/run_by_name' 208

scripts/attention.py

Source: head-ros-nodes/ros/r2_behavior/scripts/attention.py

Kind Arguments in source order Line
Subscription self.node, Int32, '/hr/perception/sound_direction', self.handle_angle, depth=10 661
Subscription self.node, String, '/hr/perception/hear/event', self.handle_vad, depth=10 662
Publisher self.node, Detections_msg, '/hr/behavior/detections_info', depth=1 801
Subscription self.node, String, '/hr/control/speech/event', self.tts_cb, depth=10 817
Publisher self.node, Target, '/hr/animation/set_face_target', depth=1 1171
Publisher self.node, Target, '/hr/animation/set_gaze_target', depth=1 1172
Publisher self.node, Float32, '/hr/animation/set_head_tilt', depth=1 1173
Publisher self.node, UInt8, '/hr/animation/set_animation_mode', depth=1 1174
Retained publisher self.node, String, '/hr/behavior/current_person' 1176
Retained publisher self.node, String, '/hr/behavior/current_face' 1177
Retained publisher self.node, String, '/hr/behavior/current_secondary' 1178
Retained publisher self.node, Float32, '/hr/behavior/manual_target_timer' 1179
Subscription self.node, People2, '/hr/perception/people', self._people_cb, depth=10 1182
Subscription self.node, Objects2, '/hr/perception/objects', self._objects_cb, depth=10 1183
Subscription self.node, Target, '/hr/animation/set_face_target', self.tracking_model.look_at_cmd, depth=10 1185

scripts/behavior_manager_node.py

Source: head-ros-nodes/ros/r2_behavior/scripts/behavior_manager_node.py

Kind Arguments in source order Line
Publisher String, '/behavior/action_dispatch', topic_qos(10) 108
Publisher String, '/hr/behavior/current_state', latched_state_qos() 109
Publisher String, '/events/main', topic_qos(10) 110
Subscription String, '/events/main', self.event_callback, topic_qos(10) 125
Subscription String, '/commands/set_situation', self.situation_callback, topic_qos(10) 126
Subscription String, '/perception/face_lost', self.face_lost_event_handler, topic_qos(10) 127
Subscription People2, '/hr/perception/people', self.people_callback, topic_qos(10) 128
Subscription ChatMessage, '/hr/perception/hear/sentence', self.chat_callback, topic_qos(10) 129
Subscription String, '/hr/control/speech/event', lambda msg: self.interactive_state.tts_event(msg.data), topic_qos(10) 130
Subscription String, '/hr/control/speech/tts_status', self.tts_status_callback, topic_qos(10) 136
Subscription String, '/hr/perception/hear/event', lambda msg: self.interactive_state.hearing_event(msg.data), topic_qos(10) 142
Subscription String, '/hr/perception/hear/event', self.speech_event_callback, topic_qos(10) 148
Subscription String, '/hr/behavior/state_switch', self.legacy_subscriber, topic_qos(10) 149
Subscription String, '/hr/behavior/operator_command', self.operator_command_callback, topic_qos(10) 150

scripts/nlp_events_node.py

Source: head-ros-nodes/ros/r2_behavior/scripts/nlp_events_node.py

Kind Arguments in source order Line
Publisher self.node, String, '/events/main', depth=10 17
Subscription self.node, String, '/events/main', self.on_event, depth=10 18

scripts/objects_reducer_node.py

Source: head-ros-nodes/ros/r2_behavior/scripts/objects_reducer_node.py

Kind Arguments in source order Line
Publisher self.node, String, '/events/main', depth=10 17
ROS parameter 'min_confidence', 0.6 19
ROS parameter 'frames_required_present', 3 20
ROS parameter 'frame_window_size', 5 21
ROS parameter 'absence_seconds', 1.5 22
ROS parameter 'context_cadence_hz', 2.0 23
Subscription self.node, Objects2, '/hr/perception/objects', self.on_objects, depth=10 33

scripts/people_presence_node.py

Source: head-ros-nodes/ros/r2_behavior/scripts/people_presence_node.py

Kind Arguments in source order Line
Publisher self.node, String, '/events/main', depth=10 25
ROS parameter 'frames_required_present', 2 27
ROS parameter 'frame_window_size', 4 28
ROS parameter 'absence_seconds', 2.0 29
Subscription self.node, People2, '/hr/perception/people', self.on_people, depth=10 41

scripts/rules_engine_adapter_node.py

Source: head-ros-nodes/ros/r2_behavior/scripts/rules_engine_adapter_node.py

Kind Arguments in source order Line
Publisher self.node, String, '/events/main', depth=10 27
Subscription self.node, ChatMessage, '/hr/perception/hear/sentence', self.sentence_callback, depth=10 29
Subscription self.node, String, '/hr/perception/hear/event', self.speech_event_callback, depth=10 30
Subscription self.node, String, '/hr/control/speech/tts_status', self.tts_status_callback, depth=10 31
Subscription self.node, TTS, '/hr/control/speech/say', self.tts_say_callback, depth=10 32
Subscription self.node, People2, '/hr/perception/people', self.people_callback, depth=10 33

scripts/scene_description_node.py

Source: head-ros-nodes/ros/r2_behavior/scripts/scene_description_node.py

Kind Arguments in source order Line
Publisher String, '/events/main', topic_qos(10) 15

scripts/states.py

Source: head-ros-nodes/ros/r2_behavior/scripts/states.py

Kind Arguments in source order Line
Publisher String, '/hr/behavior/current_state', latched_state_qos() 93
Publisher String, '/hr/control/performances/running_performance', topic_qos(1) 94
Publisher ChatMessage, '/hr/interaction/chatbot_input', topic_qos(10) 97
Service client RunByName, '/hr/control/performances/run_full_performance' 99
Subscription People2, '/hr/perception/people', self.detection_cb, topic_qos(10) 133
Subscription Objects2, '/hr/perception/objects', self.detection_cb, topic_qos(10) 134
Subscription ChatMessage, '/hr/perception/hear/sentence', self.speech_cb, topic_qos(10) 135
Subscription String, '/hr/control/speech/event', self.speech_events_cb, topic_qos(10) 136
Subscription String, '/hr/control/speech/tts_status', self.tts_status_cb, topic_qos(10) 137
Subscription String, '/hr/perception/hear/event', self.chat_events_cb, topic_qos(10) 138
Subscription String, '/hr/control/performances/running_performance', self.performance_cb, topic_qos(10) 139
Subscription PerformanceEvent, '/hr/control/performances/events', self.performance_events_cb, topic_qos(10) 145
Subscription PerformanceEvent, '/hr/control/performances/background/events', self.performance_bg_events_cb, topic_qos(10) 151
Subscription String, '/hr/behavior/state_switch', self.state_callback, topic_qos(10) 157
Subscription String, '/hr/behavior/operator_command', self.operator_command_callback, topic_qos(10) 158

msg/APILookAt.msg

Source: head-ros-nodes/ros/r2_behavior/msg/APILookAt.msg

uint8 mode
uint64 id