Constructs RVIZ markers that visualize a Cartesian robot state. More...
#include <rviz_robot_builder.h>
Public Types | |
using | ContactState = EndeffectorsContact |
using | EEForces = Endeffectors< Vector3d > |
using | EEPos = EndeffectorsPos |
using | Marker = visualization_msgs::Marker |
using | MarkerArray = visualization_msgs::MarkerArray |
using | MarkerVec = std::vector< Marker > |
using | RobotState = RobotStateCartesian |
using | TerrainNormals = Endeffectors< Vector3d > |
Public Member Functions | |
MarkerArray | BuildRobotState (const xpp_msgs::RobotStateCartesian &msg) const |
Constructs the RVIZ markers from the ROS message. More... | |
RvizRobotBuilder () | |
Builds an uninitialized visualizer. More... | |
void | SetRobotParameters (const xpp_msgs::RobotParameters &msg) |
Provides additional robot info that can be used for visualization. More... | |
void | SetTerrainParameters (const xpp_msgs::TerrainInfo &msg) |
Additional information that can be used for visualization. More... | |
virtual | ~RvizRobotBuilder ()=default |
Private Member Functions | |
Marker | CreateBasePose (const Vector3d &pos, Eigen::Quaterniond ori, const ContactState &c) const |
Marker | CreateBox (const Vector3d &pos, Eigen::Quaterniond ori, const Vector3d &edge_length) const |
Marker | CreateCopPos (const EEForces &f_W, const EEPos &pos_W) const |
MarkerVec | CreateEEForces (const EEForces &f_W, const EEPos &pos_W, const ContactState &c) const |
MarkerVec | CreateEEPositions (const EEPos &pos_W, const ContactState &c) const |
Marker | CreateForceArrow (const Vector3d &f, const Vector3d &pos) const |
Marker | CreateFrictionCone (const Vector3d &pos_W, const Vector3d &terrain_normal, double friction_coeff) const |
MarkerVec | CreateFrictionCones (const EEPos &pos_W, const ContactState &c) const |
Marker | CreateGravityForce (const Vector3d &base_pos) const |
Marker | CreatePendulum (const Vector3d &base_pos, const EEForces &f_W, const EEPos &pos_W) const |
MarkerVec | CreateRangeOfMotion (const State3d &base) const |
Marker | CreateSphere (const Vector3d &pos, double diameter=0.03) const |
MarkerVec | CreateSupportArea (const ContactState &c, const EEPos &pos_W) const |
void | FillWithInvisible (int max_size, MarkerVec &vec) const |
Private Attributes | |
const std::string | frame_id_ = "world" |
xpp_msgs::RobotParameters | params_msg_ |
xpp_msgs::TerrainInfo | terrain_msg_ |
Static Private Attributes | |
const static int | max_ee_ = 10 |
Constructs RVIZ markers that visualize a Cartesian robot state.
This class is responsible for converting robot states into beautiful RVIZ markers. The visualize quantities such as 6D base state, endeffector positions, contact state of these, endeffector forces, support areas and center of pressure.
Definition at line 83 of file rviz_robot_builder.h.
Definition at line 116 of file rviz_robot_builder.h.
Definition at line 118 of file rviz_robot_builder.h.
Definition at line 117 of file rviz_robot_builder.h.
using xpp::RvizRobotBuilder::Marker = visualization_msgs::Marker |
Definition at line 112 of file rviz_robot_builder.h.
using xpp::RvizRobotBuilder::MarkerArray = visualization_msgs::MarkerArray |
Definition at line 114 of file rviz_robot_builder.h.
using xpp::RvizRobotBuilder::MarkerVec = std::vector<Marker> |
Definition at line 113 of file rviz_robot_builder.h.
Definition at line 120 of file rviz_robot_builder.h.
Definition at line 119 of file rviz_robot_builder.h.
xpp::RvizRobotBuilder::RvizRobotBuilder | ( | ) |
Builds an uninitialized visualizer.
Definition at line 64 of file rviz_robot_builder.cc.
|
virtualdefault |
RvizRobotBuilder::MarkerArray xpp::RvizRobotBuilder::BuildRobotState | ( | const xpp_msgs::RobotStateCartesian & | msg | ) | const |
Constructs the RVIZ markers from the ROS message.
msg | The ROS message describing the Cartesian robot state. |
Definition at line 90 of file rviz_robot_builder.cc.
|
private |
Definition at line 243 of file rviz_robot_builder.cc.
|
private |
Definition at line 338 of file rviz_robot_builder.cc.
|
private |
Definition at line 262 of file rviz_robot_builder.cc.
|
private |
Definition at line 169 of file rviz_robot_builder.cc.
|
private |
Definition at line 140 of file rviz_robot_builder.cc.
|
private |
Definition at line 366 of file rviz_robot_builder.cc.
|
private |
Definition at line 219 of file rviz_robot_builder.cc.
|
private |
Definition at line 190 of file rviz_robot_builder.cc.
|
private |
Definition at line 157 of file rviz_robot_builder.cc.
|
private |
Definition at line 289 of file rviz_robot_builder.cc.
|
private |
Definition at line 317 of file rviz_robot_builder.cc.
|
private |
Definition at line 352 of file rviz_robot_builder.cc.
|
private |
Definition at line 388 of file rviz_robot_builder.cc.
|
private |
Makes sure no artifacts remain from previous visualization.
max_size | Number of marker for this rviz vector, should be constant. |
vec | The vector of rviz markers. |
Definition at line 82 of file rviz_robot_builder.cc.
void xpp::RvizRobotBuilder::SetRobotParameters | ( | const xpp_msgs::RobotParameters & | msg | ) |
Provides additional robot info that can be used for visualization.
msg | The ROS message. |
This additional information includes such values as the robots mass (for gravity force visualization), the robots nominal endeffector configuration, etc (see OptParameters).
Definition at line 70 of file rviz_robot_builder.cc.
void xpp::RvizRobotBuilder::SetTerrainParameters | ( | const xpp_msgs::TerrainInfo & | msg | ) |
Additional information that can be used for visualization.
msg | The ROS message. |
This information is related to the terrain, such as the current terrain normals at the endeffectors and friction coefficient (for friction cone visualization).
Definition at line 76 of file rviz_robot_builder.cc.
|
private |
Definition at line 194 of file rviz_robot_builder.h.
|
staticprivate |
Definition at line 202 of file rviz_robot_builder.h.
|
private |
Definition at line 191 of file rviz_robot_builder.h.
|
private |
Definition at line 192 of file rviz_robot_builder.h.