Size: 14006
Comment:
|
← Revision 29 as of 2012-09-25 11:29:32 ⇥
Size: 17657
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
GUI Primitives for HRI are designed to visualize and ilustrate objects detected by the robot. Primitives will also add means to interact with particular objects and give commands to the robot throw them. Primitives consists of [[http://www.ros.org/wiki/interactive_markers|Interactive Markers]] and are visualized in [[http://www.ros.org/wiki/rviz|RViz]]. Primitives have context menu, which allow some interaction and settings of the visualization (e.g., ability to show descrition of the primitive, add or remove manipulators for rotation or translation, ...). Types of the primitives followed and are specified in [[http://ros.org/doc/api/srs_env_model/html/msg/PrimitiveType.html|srs_env_model/PrimitiveType]] message. |
This package introduces GUI Primitives for HRI that are designed to visualize and illustrate objects detected by the robot. These primitives also allow to interact with particular objects and give commands to the robot via them. The primitives consists of [[http://www.ros.org/wiki/interactive_markers|Interactive Markers]] and are visualized in [[http://www.ros.org/wiki/rviz|RViz]]. All primitives have a context menu which allows some interaction and setting of the visualization (ability to show description of the primitive, add/remove manipulators for rotation and translation, etc.). Following predefined types of primitives and are specified in [[http://ros.org/doc/api/srs_env_model/html/msg/PrimitiveType.html|srs_env_model/PrimitiveType]] message. === Interaction Primitives === |
Line 14: | Line 15: |
* Billboard represents real world object detected around robot, which is hard to describe with some mesh. * Billboard is view facing and iẗ́'s types are specified in [[http://ros.org/doc/api/srs_env_model/html/msg/BillboardType.html|srs_env_model/BillboardType]] message. {{attachment:billboard-chair.png||width=50%}}{{attachment:billboard-person-head.png||width=50%}} * Billboard can also illustrate the movement of the represented object, e.g., walking person. {{attachment:billboard-person.png||width=100%}} |
* Billboard represents a real world object which is hard to describe with some mesh. * The billboard is view facing and iẗ́s type is specified in [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/BillboardType.html|srs_interaction_primitives/BillboardType]] message. {{attachment:billboard-chair.png||width=40%}}{{attachment:billboard-person-head.png||width=40%}} * The billboard can also illustrate movement of the represented object, e.g. walking person. {{attachment:billboard-person.png||width=80%}} |
Line 21: | Line 23: |
* Bounding Box ilustrates the smallest dimensions of the object. * Bounding Box can visualize object's dimensions. * Bounding Box can be translated or rotated. {{attachment:bbox.png||width=80%}} |
* Bounding Box illustrates dimensions of the object. * The bounding box is able visualize its dimensions as text labels. * The bounding box can be manually translated or rotated. {{attachment:bbox.png||width=70%}} |
Line 27: | Line 30: |
* Object is representation of detected object, which has it's mesh in object database. * Around object can be shown pre-grasp positions, which aids operator to move gripper to correct position for grasping. * Object can show it's Bounding Box (if specified) * Object can be rotated, translated and scaled. {{attachment:pre-grasp2.png||width=100%}} {{attachment:object-with-bbox.png||width=80%}} |
* Object represents a detected or real-world object which has its mesh in an object database. * Possible pre-grasp positions can be shown around the object. The visualization of pre-grasp positions aids operator to move gripper to a correct position for the grasping. * The object can show its bounding box (if specified). * The object can be manually rotated, translated and scaled in the scene. {{attachment:pre-grasp2.png||width=70%}} {{attachment:object-with-bbox.png||width=60%}} |
Line 35: | Line 40: |
* Unknown Object will show some obstacles, unreachable objects or dangerous places in the scene, some the operator will be able to avoid collisions or crash of the robot. * Unknown Object can be rotated, translated and scaled. |
* Unknown Object represents obstacles, unreachable objects or dangerous places in the scene so that the operator will be able to avoid collisions or crashes of the robot. * The unknown object can be manually rotated, translated and scaled in the scene. |
Line 44: | Line 49: |
* It's a variation of the Plane, which is defined with planar polygon. * It's shown as transparent plane and polygon inside it. |
* It's a variation of the Plane which is defined as a planar polygon. * The plane polygon is shown as a transparent plane with the polygon inside it. |
Line 48: | Line 53: |
=== Others === ==== Clickable positions ==== Clickable positions can be added to the scene using ''/clickable_positions'' service or ClickablePositions action. By clicking on the position are it's coordinates published on the specified topic. ==== Robot's pose prediction ==== For visualization of robot's predicted movement positions is provided service ''/robot_pose_prediction''. Position are visualized using [[http://www.ros.org/wiki/rviz/DisplayTypes/Marker|Markers]]. Service takes 2 arguments: * '''geometry_msgs/Pose[] positions''' - predicted positions * '''ttl''' - markers lifetime {{attachment:robot_pose_prediction.png||width=80%}} |
|
Line 54: | Line 73: |
|| interaction_primitives_service_server || <<MiniPage( * /but_interaction_primitives/primitive_name/update/pose_changed\n * /but_interaction_primitives/primitive_name/update/scale_changed\n * /but_interaction_primitives/primitive_name/update/menu_clicked\n * /but_interaction_primitives/primitive_name/update/movement_changed\n * /but_interaction_primitives/primitive_name/update/tag_changed )>> || This node publishes but_interaction_primitives services. || | || interaction_primitives_service_server || <<MiniPage( * /interaction_primitives/primitive_name/update/pose_changed\n * /interaction_primitives/primitive_name/update/scale_changed\n * /interaction_primitives/primitive_name/update/menu_clicked\n * /interaction_primitives/primitive_name/update/movement_changed\n * /interaction_primitives/primitive_name/update/tag_changed )>> || This node publishes interaction_primitives services. || |
Line 58: | Line 77: |
All services starts with prefix {{{/but_interaction_primitives}}} | All services starts with prefix {{{/interaction_primitives}}} |
Line 61: | Line 80: |
|| /add_billboard || <<MiniPage( * string frame_id\n * string name\n * string description\n * uint8 type\n * float64 velocity\n * geometry_msgs/Quaternion direction\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale )>>|| || Adds billboard to the scene || || /add_bounding_box || <<MiniPage( * string frame_id\n * string name\n * string object_name\n * string description\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale\n * std_msgs/ColorRGBA color )>>|| || Adds Bounding Box to the scene || || /add_plane || <<MiniPage( * string frame_id\n * string name\n * string description\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale\n * std_msgs/ColorRGBA color )>>|| || Adds Plane to the scene|| |
|| /add_billboard || <<MiniPage( * string frame_id\n * string name\n * string description\n * uint8 type\n * float64 velocity\n * geometry_msgs/Quaternion direction\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale )>>|| || Adds billboard to the scene || || /add_bounding_box || <<MiniPage( * string frame_id\n * string name\n * string object_name\n * string description\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale\n * std_msgs/ColorRGBA color )>>|| || Adds Bounding Box to the scene || || /add_plane || <<MiniPage( * string frame_id\n * string name\n * string description\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale\n * std_msgs/ColorRGBA color )>>|| || Adds Plane to the scene|| |
Line 65: | Line 84: |
|| /add_object || <<MiniPage( * string frame_id\n * string name\n * string description\n * geometry_msgs/Pose pose\n * geometry_msgs/Point bounding_box_lwh\n * std_msgs/ColorRGBA color\n * string resource\n * bool use_material )>>|| || Adds Object to the scene || || /add_unknown_object || <<MiniPage( * string frame_id\n * string name\n * string description\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale )>>|| || Add Unknown Object to the scene|| |
|| /add_object || <<MiniPage( * string frame_id\n * string name\n * string description\n * geometry_msgs/Pose pose\n * geometry_msgs/Point bounding_box_lwh\n * std_msgs/ColorRGBA color\n * string resource\n * bool use_material\n * bool allow_pregrasp )>>|| || Adds Object to the scene || || /add_unknown_object || <<MiniPage( * string frame_id\n * string name\n * string description\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale )>>|| || Adds Unknown Object to the scene|| |
Line 77: | Line 96: |
|| /set_allow_object_interaction || <<MiniPage( * string name\n * bool allow)>>|| || Allows od denies interaction with specified Object || || /get_billboard || <<MiniPage( * string name )>>|| <<MiniPage( * string frame_id\n * string name\n * string description\n * uint8 type\n * float64 velocity\n * geometry_msgs/Quaternion direction\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale )>> || Gets billboard || || /get_bounding_box || <<MiniPage( * string name)>>|| <<MiniPage( * string frame_id\n * string name\n * string object_name\n * string description\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale\n * std_msgs/ColorRGBA color )>> || Ges Bounding Box || || /get_plane || <<MiniPage( * string name )>>|| <<MiniPage( * string frame_id\n * string name\n * string description\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale\n * std_msgs/ColorRGBA color )>> || Gets Plane|| || /get_object || <<MiniPage( * string name )>> || <<MiniPage( * string frame_id\n * string name\n * string description\n * geometry_msgs/Pose pose\n * geometry_msgs/Point bounding_box_lwh\n * std_msgs/ColorRGBA color\n * string resource\n * bool use_material )>> || Gets Object || || /get_unknown_object || <<MiniPage( * string name )>>|| <<MiniPage( * string frame_id\n * string name\n * string description\n * uint8 pose_type\n * geometry_msgs/Pose pose\n * geometry_msgs/Vector3 scale )>> || Gets Unknown Object || || /clickable_positions || <<MiniPage( * string frame_id \n * string topic_suffix \n * float64 radius \n * std_msgs/ColorRGBA color \n * geometry_msgs/Point[] positions )>>||<<MiniPage( * string topic)>> || Shows clickable positions || || /robot_pose_prediction || <<MiniPage( * geometry_msgs/Pose[] positions \n * float64 ttl )>>|| || Shows predicted positions of robot's movement || |
|
Line 82: | Line 108: |
|| PrimitiveType ||[[http://ros.org/doc/api/srs_env_model/html/msg/PrimitiveType.html|content]] || Types of Primitives || || BillboardType || [[http://ros.org/doc/api/srs_env_model/html/msg/BillboardType.html|content]]|| Types of Billboard || || MenuClicked || [[http://ros.org/doc/api/srs_env_model/html/msg/MenuClicked.html|content]] || Message for update topic || || MovementChanged || [[http://ros.org/doc/api/srs_env_model/html/msg/MovementChanged.html|content]] || Message for update topic || || PoseChanged || [[http://ros.org/doc/api/srs_env_model/html/msg/PoseChanged.html|content]] || Message for update topic || || ScaleChanged || [[http://ros.org/doc/api/srs_env_model/html/msg/ScaleChanged.html|content]] || Message for update topic || || TagChanged || [[http://ros.org/doc/api/srs_env_model/html/msg/TagChanged.html|content]] || Message for update topic || |
|| PrimitiveType ||[[http://ros.org/doc/api/srs_interaction_primitives/html/msg/PrimitiveType.html|content]] || Types of Primitives || || BillboardType || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/BillboardType.html|content]]|| Types of Billboard || || PoseType || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/PoseType.html|content]]|| Specifies if the coordinates are in the center or in the base of the primitive || || MenuClicked || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/MenuClicked.html|content]] || Message for update topic || || MovementChanged || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/MovementChanged.html|content]] || Message for update topic || || PoseChanged || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/PoseChanged.html|content]] || Message for update topic || || ScaleChanged || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/ScaleChanged.html|content]] || Message for update topic || || TagChanged || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/TagChanged.html|content]] || Message for update topic || || PositionClicked || [[http://ros.org/doc/api/srs_interaction_primitives/html/msg/PositionsClicked.html|content]] || Message for position clicked topic || |
Line 93: | Line 120: |
All topics starts with prefix {{{but_interaction_primitives}}}. | All topics starts with prefix {{{interaction_primitives}}}. |
Line 96: | Line 123: |
||/primitive_name/update/pose_changed || srs_env_model/PoseChanged || Publishes pose changes of the primitive|| ||/primitive_name/update/scale_changed|| srs_env_model/ScaleChanged || Publishes scale changes of the primitive|| ||/primitive_name/update/menu_clicked || srs_env_model/MenuClicked || Publishes information about menu interaction of the primitive|| ||/primitive_name/update/movement_changed ||srs_env_model/MovementChanged ||Publishes movement changes of the primitive (Billboard only)|| ||/primitive_name/update/tag_changed || srs_env_model/TagChanged || Publishes tag changes of the primitive (Plane only) || |
||/primitive_name/update/pose_changed || srs_interaction_primitives/PoseChanged || Publishes pose changes of the primitive|| ||/primitive_name/update/scale_changed|| srs_interaction_primitives/ScaleChanged || Publishes scale changes of the primitive|| ||/primitive_name/update/menu_clicked || srs_interaction_primitives/MenuClicked || Publishes information about menu interaction of the primitive|| ||/primitive_name/update/movement_changed ||srs_interaction_primitives/MovementChanged ||Publishes movement changes of the primitive (Billboard only)|| ||/primitive_name/update/tag_changed || srs_interaction_primitives/TagChanged || Publishes tag changes of the primitive (Plane only) || ||/clickable_positions/topic_suffix || srs_interaction_primitives/PositionClicked || Publishes position which was clicked || |
Line 111: | Line 143: |
=== Adding primitives programatically === | === Adding primitives from C++ === |
Line 120: | Line 152: |
milkBillboard->setType(srs_interaction_primitives::BillboardType::PERSON); // type PERSON milkBillboard->setPose(pose); // actual position of the billboard milkBillboard->setScale(scale); // scale of the billboard milkBillboard->setDirection(direction); // actual movement direction milkBillboard->setVelocity(velocity); // actual movement velocity milkBillboard->setDescription("This is me!"); // description milkBillboard->insert(); // creates interaction primitive a inserts it into IMS |
billboard->setType(srs_interaction_primitives::BillboardType::PERSON); // type PERSON billboard->setPose(pose); // actual position of the billboard billboard->setPoseType(srs_interaction_primitives::PoseType::POSE_CENTER); // coordinates are int the center of the primitive billboard->setScale(scale); // scale of the billboard billboard->setDirection(direction); // actual movement direction billboard->setVelocity(velocity); // actual movement velocity billboard->setDescription("This is me!"); // description billboard->insert(); // creates interaction primitive a inserts it into IMS |
Line 149: | Line 182: |
rosservice call /interaction_primitives/add_bounding_box '{frame_id: /world, name: bbox, object_name: obj, description: "", pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, color: { r: 1, g: 0, b: 0 }}' | rosservice call /interaction_primitives/add_bounding_box '{frame_id: /world, name: bbox, object_name: obj, description: "", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, color: { r: 1, g: 0, b: 0 }}' |
Line 153: | Line 186: |
rosservice call /interaction_primitives/add_billboard '{frame_id: /world, name: billboard, type: 2, description: "this is billboard", velocity: 5.6, direction: {x: 1, y: 1, z: 0, w: 1}, pose: {position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }}' | rosservice call /interaction_primitives/add_billboard '{frame_id: /world, name: billboard, type: 2, description: "this is billboard", velocity: 5.6, direction: {x: 1, y: 1, z: 0, w: 1}, 0, pose: {position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }}' |
Line 157: | Line 190: |
rosservice call /interaction_primitives/add_plane '{frame_id: /world, name: plane, description: "", pose: { position: { x: -1, y: 0, z: 5 }, orientation: { x: 0, y: 1, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, color: { r: 1, g: 0.3, b: 0, a: 1.0 }}' | rosservice call /interaction_primitives/add_plane '{frame_id: /world, name: plane, description: "", 0, pose: { position: { x: -1, y: 0, z: 5 }, orientation: { x: 0, y: 1, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, color: { r: 1, g: 0.3, b: 0, a: 1.0 }}' |
Line 161: | Line 194: |
rosservice call /interaction_primitives/add_object '{frame_id: /world, name: table_obj, description: "My table", pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, resource: "package://gazebo_worlds/Media/models/table.dae", use_material: false, color: {r: 1, g: 0, b: 1, a: 1 }}' | rosservice call /interaction_primitives/add_object '{frame_id: /world, name: table_obj, description: "My table", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, resource: "package://gazebo_worlds/Media/models/table.dae", use_material: false, color: {r: 1, g: 0, b: 1, a: 1 }}' |
Line 165: | Line 198: |
rosservice call /interaction_primitives/add_unknown_object '{frame_id: /world, name: uobj, description: "", pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 } }' | rosservice call /interaction_primitives/add_unknown_object '{frame_id: /world, name: uobj, description: "", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 } }' |
Line 169: | Line 202: |
rosservice call /interaction_primitives/add_object '{frame_id: /world, name: milk, description: "Detected milk", pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, bounding_box_lwh: {x: 1.0, y: 0.2, z: 0.1}, color: {r: 1, g: 1, b: 0}, resource: package://cob_gazebo_worlds/Media/models/milk_box.dae, use_material: True}' | rosservice call /interaction_primitives/add_object '{frame_id: /world, name: milk, description: "Detected milk", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, bounding_box_lwh: {x: 1.0, y: 0.2, z: 0.1}, color: {r: 1, g: 1, b: 0}, resource: package://cob_gazebo_worlds/Media/models/milk_box.dae, use_material: True}' |
Line 217: | Line 250: |
but_gui::AddBoundingBox bboxSrv; | srs_interaction_primitives::AddBoundingBox bboxSrv; |
Line 222: | Line 255: |
bboxSrv.request.pose_type = srs_interaction_primitives::PoseType::POSE_BASE; | |
Line 249: | Line 283: |
## AUTOGENERATED DON'T DELETE ## CategoryPackage |
Only released in EOL distros:
Package Summary
GUI primitives for HRI based on Interactive Markers provided by dcgm-robotics@FIT group.
- Author: Tomas Lokaj, Michal Spanel (spanel@fit.vutbr.cz)
- License: LGPL
- Source: git https://github.com/ipa320/srs_public.git (branch: master)
Package Summary
GUI primitives for HRI based on Interactive Markers provided by dcgm-robotics@FIT group.
- Author: Tomas Lokaj, Michal Spanel (spanel@fit.vutbr.cz)
- License: LGPL
- Source: git https://github.com/ipa320/srs_public.git (branch: master)
Package Summary
GUI primitives for HRI based on Interactive Markers provided by dcgm-robotics@FIT group.
- Author: Tomas Lokaj, Michal Spanel (spanel@fit.vutbr.cz)
- License: LGPL
- Source: git https://github.com/ipa320/srs_public.git (branch: master)
Contents
Overview
This package introduces GUI Primitives for HRI that are designed to visualize and illustrate objects detected by the robot. These primitives also allow to interact with particular objects and give commands to the robot via them. The primitives consists of Interactive Markers and are visualized in RViz.
All primitives have a context menu which allows some interaction and setting of the visualization (ability to show description of the primitive, add/remove manipulators for rotation and translation, etc.).
Following predefined types of primitives and are specified in srs_env_model/PrimitiveType message.
Interaction Primitives
Billboard
- Billboard represents a real world object which is hard to describe with some mesh.
The billboard is view facing and iẗ́s type is specified in srs_interaction_primitives/BillboardType message.
- The billboard can also illustrate movement of the represented object, e.g. walking person.
Bounding Box
- Bounding Box illustrates dimensions of the object.
- The bounding box is able visualize its dimensions as text labels.
- The bounding box can be manually translated or rotated.
Object
- Object represents a detected or real-world object which has its mesh in an object database.
- Possible pre-grasp positions can be shown around the object. The visualization of pre-grasp positions aids operator to move gripper to a correct position for the grasping.
- The object can show its bounding box (if specified).
- The object can be manually rotated, translated and scaled in the scene.
Unknown Object
- Unknown Object represents obstacles, unreachable objects or dangerous places in the scene so that the operator will be able to avoid collisions or crashes of the robot.
- The unknown object can be manually rotated, translated and scaled in the scene.
Plane
- Plane shows only a simple plane which can be tagged as table desk, wall, etc.
Plane Polygon
- It's a variation of the Plane which is defined as a planar polygon.
- The plane polygon is shown as a transparent plane with the polygon inside it.
Others
Clickable positions
Clickable positions can be added to the scene using /clickable_positions service or ClickablePositions action.
By clicking on the position are it's coordinates published on the specified topic.
Robot's pose prediction
For visualization of robot's predicted movement positions is provided service /robot_pose_prediction. Position are visualized using Markers.
Service takes 2 arguments:
geometry_msgs/Pose[] positions - predicted positions
ttl - markers lifetime
ROS API
Nodes
Node Name |
Published Topics |
Description |
interaction_primitives_service_server |
|
This node publishes interaction_primitives services. |
Services
All services starts with prefix /interaction_primitives
Service Name |
Input |
Output |
Description |
/add_billboard |
|
|
Adds billboard to the scene |
/add_bounding_box |
|
|
Adds Bounding Box to the scene |
/add_plane |
|
|
Adds Plane to the scene |
/add_plane_polygon |
|
|
Adds Plane Polygon to the scene |
/add_object |
|
|
Adds Object to the scene |
/add_unknown_object |
|
|
Adds Unknown Object to the scene |
/remove_primitive |
|
|
Removes primitive form the scene |
/change_description |
|
|
|
/change_pose |
|
|
Changes primitive's description |
/change_scale |
|
|
Changes primitive's scale |
/change_color |
|
|
Changes primitive's color |
/change_direction |
|
|
Changes billboard's movement direction |
/change_velocity |
|
|
Changes billboard's movement velocity |
/set_pregrasp_position |
|
|
Sets pre-grasp position |
/remove_pregrasp_position |
|
|
Removes pre-grasp position |
/get_update_topic |
|
|
Gets update topic for specified action (type) |
/set_allow_object_interaction |
|
|
Allows od denies interaction with specified Object |
/get_billboard |
|
|
Gets billboard |
/get_bounding_box |
|
|
Ges Bounding Box |
/get_plane |
|
|
Gets Plane |
/get_object |
|
|
Gets Object |
/get_unknown_object |
|
|
Gets Unknown Object |
/clickable_positions |
|
|
Shows clickable positions |
/robot_pose_prediction |
|
|
Shows predicted positions of robot's movement |
Messages
Msg Name |
Content |
Description |
Types of Primitives |
||
Types of Billboard |
||
Specifies if the coordinates are in the center or in the base of the primitive |
||
Message for update topic |
||
Message for update topic |
||
Message for update topic |
||
Message for update topic |
||
Message for update topic |
||
Message for position clicked topic |
Published topics
All topics starts with prefix interaction_primitives.
Topic Name |
Message |
Description |
/primitive_name/update/pose_changed |
srs_interaction_primitives/PoseChanged |
Publishes pose changes of the primitive |
/primitive_name/update/scale_changed |
srs_interaction_primitives/ScaleChanged |
Publishes scale changes of the primitive |
/primitive_name/update/menu_clicked |
srs_interaction_primitives/MenuClicked |
Publishes information about menu interaction of the primitive |
/primitive_name/update/movement_changed |
srs_interaction_primitives/MovementChanged |
Publishes movement changes of the primitive (Billboard only) |
/primitive_name/update/tag_changed |
srs_interaction_primitives/TagChanged |
Publishes tag changes of the primitive (Plane only) |
/clickable_positions/topic_suffix |
srs_interaction_primitives/PositionClicked |
Publishes position which was clicked |
Installation
Both components are in srs git in srs_interaction_primitives package and can be compiled with ROS standard tool rosmake
rosmake srs_interaction_primitives
Usage
Adding primitives from C++
1 // Create Interactive Marker Server
2 InteractiveMarkerServerPtr server;
3 server.reset(new InteractiveMarkerServer("test_primitives", "", false));
4
5 // Create billboard - /world is frame and my_billboard is primitives unique name
6 Billboard *billboard = new Billboard(server, "/world", "my_billboard");
7 billboard->setType(srs_interaction_primitives::BillboardType::PERSON); // type PERSON
8 billboard->setPose(pose); // actual position of the billboard
9 billboard->setPoseType(srs_interaction_primitives::PoseType::POSE_CENTER); // coordinates are int the center of the primitive
10 billboard->setScale(scale); // scale of the billboard
11 billboard->setDirection(direction); // actual movement direction
12 billboard->setVelocity(velocity); // actual movement velocity
13 billboard->setDescription("This is me!"); // description
14 billboard->insert(); // creates interaction primitive a inserts it into IMS
15
Using predefined services
- Run service server
rosrun srs_interaction_primitives interaction_primitives_service_server
- Run RViz
rosrun rviz rviz
Add Interactive Marker Display and set Update Topic to /interaction_primitives/update.
Now you can call services and add or update Primitives.
Calling services from bash
Add Bounding Box
rosservice call /interaction_primitives/add_bounding_box '{frame_id: /world, name: bbox, object_name: obj, description: "", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, color: { r: 1, g: 0, b: 0 }}'
Add Billboard
rosservice call /interaction_primitives/add_billboard '{frame_id: /world, name: billboard, type: 2, description: "this is billboard", velocity: 5.6, direction: {x: 1, y: 1, z: 0, w: 1}, 0, pose: {position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }}'
Add Plane
rosservice call /interaction_primitives/add_plane '{frame_id: /world, name: plane, description: "", 0, pose: { position: { x: -1, y: 0, z: 5 }, orientation: { x: 0, y: 1, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, color: { r: 1, g: 0.3, b: 0, a: 1.0 }}'
Add Object
rosservice call /interaction_primitives/add_object '{frame_id: /world, name: table_obj, description: "My table", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 }, resource: "package://gazebo_worlds/Media/models/table.dae", use_material: false, color: {r: 1, g: 0, b: 1, a: 1 }}'
Add Unknown Object
rosservice call /interaction_primitives/add_unknown_object '{frame_id: /world, name: uobj, description: "", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, scale: { x: 1, y: 1, z: 1 } }'
Add Object
rosservice call /interaction_primitives/add_object '{frame_id: /world, name: milk, description: "Detected milk", 0, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }, bounding_box_lwh: {x: 1.0, y: 0.2, z: 0.1}, color: {r: 1, g: 1, b: 0}, resource: package://cob_gazebo_worlds/Media/models/milk_box.dae, use_material: True}'
Change pose
rosservice call /interaction_primitives/change_pose '{name: plane, pose: { position: { x: -1, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } }}'
Change scale
rosservice call /interaction_primitives/change_scale '{name: plane, scale: { x: 1.2, y: 2, z: 0.5 }}'
Change color
rosservice call /interaction_primitives/change_color '{name: plane, color: { r: 1, g: 0, b: 1, a: 0.5}}'
Change description
rosservice call /interaction_primitives/change_description '{name: plane, description: "something"}'
Set pre-grasp position
rosservice call /interaction_primitives/set_pregrasp_position '{name: object_name, pos_id: 1, position: {x: 0.2, y: 0.1, z: -0.5}}'
Remove pre-grasp position
rosservice call /interaction_primitives/remove_pregrasp_position '{name: object_name, pos_id: 1}'
Remove object
rosservice call /interaction_primitives/remove_object '{name: object_name}'
Calling services from C++
1 #include <ros/ros.h>
2 #include <srs_interaction_primitives/AddBoundingBox.h>
3
4 int main(int argc, char **argv)
5 {
6 // ROS initialization (the last argument is the name of the node)
7 ros::init(argc, argv, "interaction_primitives_client");
8
9 // NodeHandle is the main access point to communications with the ROS system
10 ros::NodeHandle n;
11
12 // Create a client for the add_bounding_box service
13 ros::ServiceClient bboxClient = n.serviceClient<srs_interaction_primitives::AddBoundingBox>("interaction_primitives/add_bounding_box");
14
15 // Set parameters to new Bounding Box
16 srs_interaction_primitives::AddBoundingBox bboxSrv;
17 bboxSrv.request.name = "Bounding box";
18 bboxSrv.request.object_name = "attached_object_name";
19 bboxSrv.request.frame_id = "/world";
20 bboxSrv.request.description = "This is Bounding Box";
21 bboxSrv.request.pose_type = srs_interaction_primitives::PoseType::POSE_BASE;
22 bboxSrv.request.pose.position.x = 1.0;
23 bboxSrv.request.pose.position.y = 1.0;
24 bboxSrv.request.pose.position.z = 1.0;
25 bboxSrv.request.pose.orientation.x = 0.0;
26 bboxSrv.request.pose.orientation.y = 0.0;
27 bboxSrv.request.pose.orientation.z = 0.0;
28 bboxSrv.request.pose.orientation.w = 1.0;
29 bboxSrv.request.scale.x = 2.0;
30 bboxSrv.request.scale.y = 3.0;
31 bboxSrv.request.scale.z = 4.0;
32 bboxSrv.request.color.r = 1.0;
33 bboxSrv.request.color.g = 0.0;
34 bboxSrv.request.color.b = 1.0;
35 bboxSrv.request.color.a = 1.0;
36
37 // Call service with specified parameters
38 bboxClient.call(bboxSrv);
39
40 ros::spinOnce(); // Call all the callbacks waiting to be called
41
42 return 0;
43 }