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 | |
static const 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 56 of file rviz_robot_builder.h.
Definition at line 62 of file rviz_robot_builder.h.
Definition at line 64 of file rviz_robot_builder.h.
Definition at line 63 of file rviz_robot_builder.h.
using xpp::RvizRobotBuilder::Marker = visualization_msgs::Marker |
Definition at line 58 of file rviz_robot_builder.h.
using xpp::RvizRobotBuilder::MarkerArray = visualization_msgs::MarkerArray |
Definition at line 60 of file rviz_robot_builder.h.
using xpp::RvizRobotBuilder::MarkerVec = std::vector<Marker> |
Definition at line 59 of file rviz_robot_builder.h.
Definition at line 66 of file rviz_robot_builder.h.
Definition at line 65 of file rviz_robot_builder.h.
xpp::RvizRobotBuilder::RvizRobotBuilder | ( | ) |
Builds an uninitialized visualizer.
Definition at line 37 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 63 of file rviz_robot_builder.cc.
|
private |
Definition at line 216 of file rviz_robot_builder.cc.
|
private |
Definition at line 311 of file rviz_robot_builder.cc.
|
private |
Definition at line 235 of file rviz_robot_builder.cc.
|
private |
Definition at line 142 of file rviz_robot_builder.cc.
|
private |
Definition at line 113 of file rviz_robot_builder.cc.
|
private |
Definition at line 339 of file rviz_robot_builder.cc.
|
private |
Definition at line 192 of file rviz_robot_builder.cc.
|
private |
Definition at line 163 of file rviz_robot_builder.cc.
|
private |
Definition at line 130 of file rviz_robot_builder.cc.
|
private |
Definition at line 262 of file rviz_robot_builder.cc.
|
private |
Definition at line 290 of file rviz_robot_builder.cc.
|
private |
Definition at line 325 of file rviz_robot_builder.cc.
|
private |
Definition at line 361 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 55 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 43 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 49 of file rviz_robot_builder.cc.
|
private |
Definition at line 140 of file rviz_robot_builder.h.
|
staticprivate |
Definition at line 148 of file rviz_robot_builder.h.
|
private |
Definition at line 137 of file rviz_robot_builder.h.
|
private |
Definition at line 138 of file rviz_robot_builder.h.