iDynTree::IFrameVisualization class

Interface to the visualization of frames.

Constructors, destructors, conversion operators

~IFrameVisualization() pure virtual
Destructor.

Public functions

auto addFrame(const Transform& transformation, double arrowLength = 1.0) -> size_t pure virtual
Add a frame in the visualization Returns the frame index.
auto setVisible(size_t frameIndex, bool isVisible) -> bool pure virtual
Set the specified frame visible or not.
auto getNrOfFrames() const -> size_t pure virtual
Get the number of visualized frames.
auto getFrameTransform(size_t frameIndex, Transform& currentTransform) const -> bool pure virtual
Get frame transform, relative to the parent frame (world if the frame is attached to the world).
auto updateFrame(size_t frameIndex, const Transform& transformation) -> bool pure virtual
Update Frame, the transformation is relative to the parent frame (world if the frame is attached to the world).
auto getFrameParent(size_t frameIndex) const -> std::pair<std::string, std::string> pure virtual
Get the parent of a frame.
auto setFrameParent(size_t frameIndex, const std::string& modelName, const std::string& frameName) -> bool pure virtual
Set the parent of a frame.
auto getFrameLabel(size_t frameIndex) -> ILabel* pure virtual
Get the label of a frame.

Function documentation

bool iDynTree::IFrameVisualization::setVisible(size_t frameIndex, bool isVisible) pure virtual

Set the specified frame visible or not.

Returns true in case of success, false otherwise (for example if the frame does not exists).

std::pair<std::string, std::string> iDynTree::IFrameVisualization::getFrameParent(size_t frameIndex) const pure virtual

Get the parent of a frame.

Returns a pair with the first element being the model name, and the second the frame name to which it is attached. If the frame is attached to the world, both elements are empty strings.

bool iDynTree::IFrameVisualization::setFrameParent(size_t frameIndex, const std::string& modelName, const std::string& frameName) pure virtual

Set the parent of a frame.

Returns true in case of success, false otherwise (for example if the frame index is out of bounds). If the modelName and frameName are empty strings, the frame is attached to the world. If the model name is specified, but not the frame name, it is attached to the root link of the model.

ILabel* iDynTree::IFrameVisualization::getFrameLabel(size_t frameIndex) pure virtual

Get the label of a frame.

Returns nullptr of the frame index is out of bounds.