Physics data plotting handler that keeps track of the registered components, update them and update the plot. More...
#include <Plotting.hh>
Public Slots | |
std::string | ComponentName (const uint64_t &_typeId) |
Get Component Name based on its type Id. More... | |
void | RegisterChartToComponent (uint64_t _entity, uint64_t _typeId, std::string _type, std::string _attribute, int _chart) |
Add a chart to a specefic component attribute. More... | |
void | UnRegisterChartFromComponent (uint64_t _entity, uint64_t _typeId, std::string _attribute, int _chart) |
Remove a chart from a specefic component attribute. More... | |
Public Member Functions | |
Plotting () | |
Constructor. More... | |
~Plotting () | |
Destructor. More... | |
void | LoadConfig (const tinyxml2::XMLElement *) override |
void | SetData (std::string _Id, const double &_value) |
Set the Component data of given id to the given number. More... | |
void | SetData (std::string _Id, const gz::math::Pose3d &_pose) |
Set the Component data of given id to the given pose. More... | |
void | SetData (std::string _Id, const gz::math::Vector3d &_vector) |
Set the Component data of given id to the given vector. More... | |
void | SetData (std::string _Id, const math::SphericalCoordinates &_sc) |
Set the Component data of given id to the given spherical coordinates. More... | |
void | SetData (std::string _Id, const msgs::Light &_light) |
Set the Component data of given id to the given light. More... | |
void | SetData (std::string _Id, const sdf::Physics &_physics) |
Set the Component data of given id to the given physics properties. More... | |
void | Update (const UpdateInfo &_info, EntityComponentManager &_ecm) override |
Update callback called every time the system is stepped. This is called at a Gazebo Transport thread, so any interaction with Qt should be done through signals and slots. More... | |
Public Member Functions inherited from Plugin | |
Plugin () | |
virtual | ~Plugin () |
QQuickItem * | CardItem () const |
virtual std::string | ConfigStr () |
QQmlContext * | Context () const |
bool | DeleteLaterRequested () const |
void | Load (const tinyxml2::XMLElement *_pluginElem) |
QQuickItem * | PluginItem () const |
void | PostParentChanges () |
virtual std::string | Title () const |
Additional Inherited Members | |
Protected Member Functions inherited from Plugin | |
void | DeleteLater () |
Protected Attributes inherited from Plugin | |
std::string | configStr |
std::string | title |
Detailed Description
Physics data plotting handler that keeps track of the registered components, update them and update the plot.
Constructor & Destructor Documentation
◆ Plotting()
Plotting | ( | ) |
Constructor.
◆ ~Plotting()
~Plotting | ( | ) |
Destructor.
Member Function Documentation
◆ ComponentName
|
slot |
Get Component Name based on its type Id.
- Parameters
-
[in] _typeId type Id of the component
- Returns
- Component name
◆ LoadConfig()
|
overridevirtual |
Reimplemented from Plugin.
◆ RegisterChartToComponent
|
slot |
Add a chart to a specefic component attribute.
- Parameters
-
[in] _entity entity id in the simulation [in] _typeId type identifier unique to each component type [in] _type Component Datatype ("Pose3d","Vector3d","double") [in] _attribute component attribute to add the chart to it ex: x attribute in Pose3d Component will be "x" [in] _chart chart ID to be registered
◆ SetData() [1/6]
void SetData | ( | std::string | _Id, |
const double & | _value | ||
) |
Set the Component data of given id to the given number.
- Parameters
-
[in] _Id Component Key of the components map [in] _value double Data to be set to the component valid for types (double, float, int, bool)
◆ SetData() [2/6]
void SetData | ( | std::string | _Id, |
const gz::math::Pose3d & | _pose | ||
) |
Set the Component data of given id to the given pose.
- Parameters
-
[in] _Id Component Key of the components map [in] _pose Position Data to be set to the component
◆ SetData() [3/6]
void SetData | ( | std::string | _Id, |
const gz::math::Vector3d & | _vector | ||
) |
Set the Component data of given id to the given vector.
- Parameters
-
[in] _Id Component Key of the components map [in] _vector Vector Data to be set to the component
◆ SetData() [4/6]
void SetData | ( | std::string | _Id, |
const math::SphericalCoordinates & | _sc | ||
) |
Set the Component data of given id to the given spherical coordinates.
- Parameters
-
[in] _Id Component Key of the components map [in] _sc Data to be set to the component
◆ SetData() [5/6]
void SetData | ( | std::string | _Id, |
const msgs::Light & | _light | ||
) |
Set the Component data of given id to the given light.
- Parameters
-
[in] _Id Component Key of the components map [in] _light Vector Data to be set to the component
◆ SetData() [6/6]
void SetData | ( | std::string | _Id, |
const sdf::Physics & | _physics | ||
) |
Set the Component data of given id to the given physics properties.
- Parameters
-
[in] _Id Component Key of the components map [in] _value physics Data to be set to the component
◆ UnRegisterChartFromComponent
|
slot |
Remove a chart from a specefic component attribute.
- Parameters
-
[in] _entity entity id in the simulation [in] _typeId type identifier unique to each component type [in] _attribute component attribute to remove the chart from it ex: x attribute in Pose3d Component will be "x" [in] _chart chart ID to be unregistered
◆ Update()
|
overridevirtual |
Update callback called every time the system is stepped. This is called at a Gazebo Transport thread, so any interaction with Qt should be done through signals and slots.
- Parameters
-
[in] _info Current simulation information, such as time. [in] _ecm Mutable reference to the ECM, so the system can read and write entities and their components.
Reimplemented from GuiSystem.
The documentation for this class was generated from the following file: