Class RobotModelDisplay

Inheritance Relationships

Base Type

  • public rviz_common::RosTopicDisplay< std_msgs::msg::String >

Class Documentation

class RobotModelDisplay : public rviz_common::RosTopicDisplay<std_msgs::msg::String>

Uses a robot xml description to display the pieces of a robot at the transforms broadcast by rosTF.

Public Functions

RobotModelDisplay()
~RobotModelDisplay() override
void onInitialize() override
void update(float wall_dt, float ros_dt) override
void fixedFrameChanged() override
void reset() override
void clear()

Protected Functions

virtual void load_urdf()

Loads a URDF from the ros-param named by our “Robot Description” property, iterates through the links, and loads any necessary models.

virtual void load_urdf_from_file(const std::string &filepath)
virtual void load_urdf_from_string(const std::string &robot_description)
void display_urdf_content()
void updateRobot()
void processMessage(std_msgs::msg::String::ConstSharedPtr msg) override
void onEnable() override
void onDisable() override

Protected Attributes

std::unique_ptr<robot::Robot> robot_

Handles actually drawing the robot.

bool has_new_transforms_

it needs to update the transforms

Callback sets this to tell our update function

float time_since_last_transform_
std::string robot_description_
rviz_common::properties::Property *visual_enabled_property_
rviz_common::properties::Property *collision_enabled_property_
rviz_common::properties::FloatProperty *update_rate_property_
rviz_common::properties::EnumProperty *description_source_property_
rviz_common::properties::FilePickerProperty *description_file_property_
rviz_common::properties::FloatProperty *alpha_property_
rviz_common::properties::StringProperty *tf_prefix_property_
rviz_common::properties::Property *mass_properties_
rviz_common::properties::Property *mass_enabled_property_
rviz_common::properties::Property *inertia_enabled_property_
std::unique_ptr<rviz_default_plugins::transformation::TransformerGuard<rviz_default_plugins::transformation::TFFrameTransformer>> transformer_guard_