Go to the documentation of this file.
30 #include <boost/bind/bind.hpp>
32 #include <OgreSceneNode.h>
33 #include <OgreSceneManager.h>
34 #include <OgreRibbonTrail.h>
49 "The TF frame these axes will use for their origin.",
this,
61 new Property(
"Show Trail",
false,
"Enable/disable a 2 meter \"ribbon\" which follows this frame.",
116 trail_->setVisible(
false);
131 static int count = 0;
132 std::stringstream ss;
135 trail_->setMaxChainElements(100);
136 trail_->setInitialWidth(0, 0.01
f);
137 trail_->setInitialColour(0, 1, 0, 0);
157 std::string frame = qframe.toStdString();
159 Ogre::Vector3 position;
160 Ogre::Quaternion orientation;
177 "Could not transform from [" + qframe +
"] to Fixed Frame [" +
fixed_frame_ +
178 "] for an unknown reason");
Ogre::SceneNode * getSceneNode()
Get the scene node associated with this object.
bool isEnabled() const
Return true if this Display is enabled, false if not.
virtual void queueRender()=0
Queues a render. Multiple calls before a render happens will only cause a single render.
FloatProperty * length_property_
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...
Property(const QString &name=QString(), const QVariant &default_value=QVariant(), const QString &description=QString(), Property *parent=nullptr)
Constructor.
Displays a set of XYZ axes at the origin of a chosen frame.
Property specialized to enforce floating point max/min.
FloatProperty * alpha_property_
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
Show status level and text. This is thread-safe.
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
virtual float getFloat() const
void onInitialize() override
Override this function to do subclass-specific initialization.
Ogre::SceneManager * scene_manager_
A convenience variable equal to context_->getSceneManager().
void onEnable() override
Derived classes override this to do the actual work of enabling themselves.
void updateTrail()
Create or Destroy trail based on boolean property.
void updateShape()
Update the length and radius of the axes object from property values.
void update(float dt, float ros_dt) override
Called periodically by the visualization manager.
virtual FrameManager * getFrameManager() const =0
Return the FrameManager instance.
An object that displays a set of X/Y/Z axes, with X=Red, Y=Green, Z=Blue.
Property * trail_property_
bool getTransform(const Header &header, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
Return the pose for a header, relative to the fixed frame, in Ogre classes.
void resetTrail(bool update=true)
static const QString FIXED_FRAME_STRING
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz....
TfFrameProperty * frame_property_
virtual void reset()
Called to tell the display to clear its state.
void set(float length, float radius, float alpha=1.0f)
Set the parameters on this object.
void reset() override
Called to tell the display to clear its state.
void setFrameManager(FrameManager *frame_manager)
void setPosition(const Ogre::Vector3 &position) override
Set the position of this object.
Ogre::RibbonTrail * trail_
void setOrientation(const Ogre::Quaternion &orientation) override
Set the orientation of the object.
void onDisable() override
Derived classes override this to do the actual work of disabling themselves.
Axes * axes_
Handles actually drawing the axes.
bool transformHasProblems(const std::string &frame, ros::Time time, std::string &error)
Check to see if a transform is known between a given frame and the fixed frame.
FloatProperty * radius_property_
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02