Fancy visualization for robot poses. More...
#include <robotPoseVisualization.h>
Public Member Functions | |
visualization_msgs::MarkerArray | getMarkers (const std_msgs::ColorRGBA &color, const std::string &ns) |
Get the markers for the current state. | |
bool | initialize () |
Get the initial robot state and setup services. | |
void | resetRobotState () |
Reset the current robot state to the initial one. | |
RobotPoseVisualization () | |
void | updateRobotStateJoints (const sensor_msgs::JointState &js) |
Update the current robot state with the joint positions from js. | |
void | updateRobotStatePose (const geometry_msgs::PoseStamped &pose) |
Update the current robot state with the robot at pose. | |
~RobotPoseVisualization () | |
Private Member Functions | |
bool | currentStateInitialized () const |
Private Attributes | |
arm_navigation_msgs::RobotState | _currentState |
the current state after updates | |
arm_navigation_msgs::RobotState | _initState |
the initialized state | |
ros::ServiceClient | _srvGetRobotMarker |
Fancy visualization for robot poses.
This is based on Sushi's state_transformer/GetRobotMarker service to acquire robot markers for a RobotState.
To initialize the RobotState the environment server is queried once and whatever is in there will be used to initialize the robot state.
From then on the robot state can be updated with new joint states for the arms or the actual robot pose.
Definition at line 20 of file robotPoseVisualization.h.
Definition at line 5 of file robotPoseVisualization.cpp.
Definition at line 9 of file robotPoseVisualization.cpp.
bool RobotPoseVisualization::currentStateInitialized | ( | ) | const [private] |
Definition at line 120 of file robotPoseVisualization.cpp.
visualization_msgs::MarkerArray RobotPoseVisualization::getMarkers | ( | const std_msgs::ColorRGBA & | color, |
const std::string & | ns | ||
) |
Get the markers for the current state.
Definition at line 100 of file robotPoseVisualization.cpp.
Get the initial robot state and setup services.
Definition at line 13 of file robotPoseVisualization.cpp.
Reset the current robot state to the initial one.
Definition at line 45 of file robotPoseVisualization.cpp.
void RobotPoseVisualization::updateRobotStateJoints | ( | const sensor_msgs::JointState & | js | ) |
Update the current robot state with the joint positions from js.
Definition at line 50 of file robotPoseVisualization.cpp.
void RobotPoseVisualization::updateRobotStatePose | ( | const geometry_msgs::PoseStamped & | pose | ) |
Update the current robot state with the robot at pose.
Definition at line 68 of file robotPoseVisualization.cpp.
the current state after updates
Definition at line 46 of file robotPoseVisualization.h.
the initialized state
Definition at line 45 of file robotPoseVisualization.h.
Definition at line 48 of file robotPoseVisualization.h.