diff --git a/README.md b/README.md index 4d43ffa98b8aeb14d1513e4a764734dfeb66e8ca..d72a6f8da2e27c2210b5c409c40c39366cc1dae8 100644 --- a/README.md +++ b/README.md @@ -126,8 +126,75 @@ git pull <details> <summary>Usage</summary> -The Play Gestures project is an [actionlib](http://wiki.ros.org/actionlib) based packageaction, i.e. there is an action server node to display the gestures on the robot and an action client node to start the gestures display. - +The Robot Behavior project is an [actionlib](http://wiki.ros.org/actionlib) based package. + +. + +. + +. + +Now that all the ROS modules required for the navigation are running, you will be able to launch all the Robot behavior actions. + +### look_at actions +For types of look_at actions are possible: +* `look_at_position`: To look at a specific position + + You can launch the `look_at_position` action server in two ways: + * Using a roslaunch: + ```sh + roslaunch robot_behavior behavior_look_at_position_action_client.launch look_at_position:='[x, y, global_local_flag, 1]' continuous:=False timeout:=200 + ``` + with `x` and `y`, the (x, y) position in meters in the global frame if `global_local_flag`=0 or in the robot frame if `global_local_flag`=1. The `continuous` flag is used to keep the action server alive even if the robot has already reach the goal. The `timeout` parameter will kill the action server when the timeout time will be reached. + * Publishing directly in a topic: + ```sh + rostopic pub -1 /behavior_generator/look_at_position_action/goal spring_msgs/LookAtPositionActionGoal "header: + seq: 0 + stamp: + secs: 0 + nsecs: 0 + frame_id: '' + goal_id: + stamp: + secs: 0 + nsecs: 0 + id: '' + goal: + look_at_position: [x, y, global_local_flag] + timeout: 200.0 + continuous: false" + ``` + the same parameters as set above should be set + +* `look_at_body`: To look at a specific body + + You can launch the `look_at_body` action server in two ways: + * Using a roslaunch: + ```sh + roslaunch robot_behavior behavior_look_at_body_action_client.launch body_id:=b00001 continuous:=False timeout:=200 + ``` + with `b00001` the human body id, one of the body id you can see on `rviz` or that are published in the `/humans/bodies/tracked` topic. `continuous` flag is used to keep the action server alive even if the robot has already reach the goal. `timeout` parameter will kill the action server when the timeout time will be reached. + * Publishing directly in a topic: + ```sh + rostopic pub -1 /behavior_generator/look_at_body_action/goal spring_msgs/LookAtEntityActionGoal "header: + seq: 0 + stamp: + secs: 0 + nsecs: 0 + frame_id: '' + goal_id: + stamp: + secs: 0 + nsecs: 0 + id: '' + goal: + id: 'b00001' + timeout: 200.0 + continuous: false" + ``` + the same parameters as set above should be set + +### go_to actions Below, we can see two resulting examples of the Behavior Generator running in real time in ARI robot through ROS: