Gazebo Gazebo

API Reference

6.16.0
PlotComponent Class Reference

A container of the component data that keeps track of the registered attributes and update their values and their registered charts. More...

#include <Plotting.hh>

Public Member Functions

 PlotComponent (const std::string &_type, ignition::gazebo::Entity _entity, ComponentTypeId _typeId)
 Constructor. More...
 
 ~PlotComponent ()
 Destructor. More...
 
std::map< std::string, std::shared_ptr< gz::gui::PlotData > > Data () const
 Get all attributes of the component. More...
 
ignition::gazebo::Entity Entity ()
 Get the Component entity ID. More...
 
bool HasCharts ()
 Check if any of the component attributes has any chart. More...
 
void RegisterChart (std::string _attribute, int _chart)
 Add a registered chart to the attribute. More...
 
void SetAttributeValue (std::string _attribute, const double &_value)
 Set a value of specefic component attribute. More...
 
ComponentTypeId TypeId ()
 Get the Component type ID. More...
 
void UnRegisterChart (std::string _attribute, int _chart)
 Remove a registered chart from the attribute. More...
 

Detailed Description

A container of the component data that keeps track of the registered attributes and update their values and their registered charts.

Constructor & Destructor Documentation

◆ PlotComponent()

PlotComponent ( const std::string _type,
ignition::gazebo::Entity  _entity,
ComponentTypeId  _typeId 
)

Constructor.

Parameters
[in]_typecomponent data type (Pose3d, Vector3d, double)
[in]_entityentity id of that component
[in]_typeIdtype identifier unique to each component type

◆ ~PlotComponent()

Destructor.

Member Function Documentation

◆ Data()

std::map<std::string, std::shared_ptr<gz::gui::PlotData> > Data ( ) const

Get all attributes of the component.

Returns
component attributes

◆ Entity()

Get the Component entity ID.

Returns
Entity ID

◆ HasCharts()

bool HasCharts ( )

Check if any of the component attributes has any chart.

Returns
true if any attribute has a chart false if all attributes are empty from the charts

◆ RegisterChart()

void RegisterChart ( std::string  _attribute,
int  _chart 
)

Add a registered chart to the attribute.

Parameters
[in]_attributecomponent attribute to add the chart to it
[in]_chartchart ID to be added to the attribute

◆ SetAttributeValue()

void SetAttributeValue ( std::string  _attribute,
const double &  _value 
)

Set a value of specefic component attribute.

Parameters
[in]_attributecomponent attribute to set its value ex : yaw attribute in Pose3d type Component
[in]_valuevalue to be set to the attribute

◆ TypeId()

ComponentTypeId TypeId ( )

Get the Component type ID.

Returns
component type ID

◆ UnRegisterChart()

void UnRegisterChart ( std::string  _attribute,
int  _chart 
)

Remove a registered chart from the attribute.

Parameters
[in]_attributecomponent attribute to remove the chart from it
[in]_chartchart ID to be removed from the attribute

The documentation for this class was generated from the following file: