32 #include <boost/bind.hpp> 34 #include <OgreSceneNode.h> 35 #include <OgreSceneManager.h> 53 "The TF frame this grid will use for its origin.",
57 "The number of cells to draw in the plane of the grid.",
62 "The number of cells to draw along the normal vector of the grid. " 63 " Setting to anything but 0 makes the grid 3D.",
68 "The length, in meters, of the side of each cell.",
73 "The rendering operation to use to draw the grid lines.",
79 "The width, in meters, of each grid line.",
85 "The color of the grid lines.",
88 "The amount of transparency to apply to the grid lines.",
94 "The plane to draw the grid along.",
101 "Allows you to offset the grid from the origin of the reference frame. In meters.",
133 std::string frame = qframe.toStdString();
135 Ogre::Vector3 position;
136 Ogre::Quaternion orientation;
153 "Could not transform from [" + qframe +
"] to [" +
fixed_frame_ +
"]" );
216 Ogre::Quaternion orient;
220 orient = Ogre::Quaternion( 1, 0, 0, 0 );
223 orient = Ogre::Quaternion( Ogre::Vector3( 0, -1, 0 ), Ogre::Vector3( 0, 0, 1 ), Ogre::Vector3( 1, 0, 0 ));
227 orient = Ogre::Quaternion( Ogre::Vector3( 1, 0, 0 ), Ogre::Vector3( 0, 0, -1 ), Ogre::Vector3( 0, 1, 0 ));
virtual QColor getColor() const
IntProperty * height_property_
Ogre::SceneNode * getSceneNode()
Get the Ogre scene node associated with this grid.
EnumProperty * plane_property_
Grid * grid_
Handles actually drawing the grid.
virtual void update(float dt, float ros_dt)
Called periodically by the visualization manager.
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.
virtual void onInitialize()
Override this function to do subclass-specific initialization.
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz...
virtual int getInt() const
Return the internal property value as an integer.
FloatProperty * line_width_property_
FloatProperty * cell_size_property_
virtual float getFloat() const
IntProperty * cell_count_property_
void setHeight(uint32_t count)
Property specialized to enforce floating point max/min.
EnumProperty * style_property_
Property specialized to provide max/min enforcement for integers.
Ogre::SceneNode * scene_node_
The Ogre::SceneNode to hold all 3D scene elements shown by this Display.
void setStyle(Style style)
Ogre::ColourValue qtToOgre(const QColor &c)
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
void setCellCount(uint32_t count)
void setCellLength(float len)
FloatProperty * alpha_property_
virtual void addOption(const QString &option, int value=0)
Displays a grid in either the XY, YZ, or XZ plane.
ColorProperty * color_property_
void show()
Show this Property in any PropertyTreeWidgets.
virtual FrameManager * getFrameManager() const =0
Return the FrameManager instance.
Displays a grid of cells, drawn with lines.
Ogre::SceneManager * scene_manager_
A convenience variable equal to context_->getSceneManager().
virtual void queueRender()=0
Queues a render. Multiple calls before a render happens will only cause a single render.
virtual Ogre::Vector3 getVector() const
void setLineWidth(float width)
static const QString FIXED_FRAME_STRING
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 setFrameManager(FrameManager *frame_manager)
void hide()
Hide this Property in any PropertyTreeWidgets.
bool initialized() const
Returns true if the display has been initialized.
virtual int getOptionInt()
Return the int value of the currently-chosen option, or 0 if the current option string does not have ...
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
void setColor(const Ogre::ColourValue &color)
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
Show status level and text. This is thread-safe.
TfFrameProperty * frame_property_
VectorProperty * offset_property_