30 #include <OgreEntity.h> 31 #include <OgreSceneNode.h> 94 void setMessage(
const geometry_msgs::PoseStampedConstPtr& message)
104 message->pose.position.y,
105 message->pose.position.z ));
107 message->pose.orientation.x,
108 message->pose.orientation.y,
109 message->pose.orientation.z ));
121 : pose_valid_( false )
268 "This warning will only be output once but may be true for others; " 269 "enable DEBUG messages for ros.rviz.quaternions to see more details.",
271 ROS_DEBUG_NAMED(
"quaternions",
"Pose '%s' contains unnormalized quaternions.",
275 Ogre::Vector3 position;
276 Ogre::Quaternion orientation;
279 ROS_ERROR(
"Error transforming pose '%s' from frame '%s' to frame '%s'",
FloatProperty * shaft_radius_property_
Ogre::ColourValue getOgreColor() const
friend class PoseDisplaySelectionHandler
virtual bool setVector(const Ogre::Vector3 &vector)
FloatProperty * axes_length_property_
virtual void onInitialize()
StringProperty * frame_property_
virtual void processMessage(const geometry_msgs::PoseStamped::ConstPtr &message)
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz...
PoseDisplaySelectionHandlerPtr coll_handler_
A single element of a property tree, with a name, value, description, and possibly children...
virtual float getFloat() const
virtual void onEnable()
Overridden from MessageFilterDisplay to get arrow/axes visibility correct.
virtual void setReadOnly(bool read_only)
Overridden from Property to propagate read-only-ness to children.
Property specialized to enforce floating point max/min.
void set(float shaft_length, float shaft_diameter, float head_length, float head_diameter)
Set the parameters for this arrow.
FloatProperty * shaft_length_property_
Ogre::SceneNode * scene_node_
The Ogre::SceneNode to hold all 3D scene elements shown by this Display.
Accumulates and displays the pose from a geometry_msgs::PoseStamped message.
Ogre::SceneNode * getSceneNode()
Get the scene node associated with this arrow.
void createProperties(const Picked &obj, Property *parent_property)
Override to create properties of the given picked object(s).
VectorProperty * position_property_
void setMessage(const geometry_msgs::PoseStampedConstPtr &message)
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
#define ROS_DEBUG_NAMED(name,...)
void updateShapeVisibility()
Pure-virtual base class for objects which give Display subclasses context in which to work...
std::vector< Ogre::AxisAlignedBox > V_AABB
bool validateFloats(const sensor_msgs::CameraInfo &msg)
FloatProperty * alpha_property_
virtual void addOption(const QString &option, int value=0)
void updateArrowGeometry()
QuaternionProperty * orientation_property_
virtual void setReadOnly(bool read_only)
Overridden from Property to propagate read-only-ness to children.
virtual void setColor(float r, float g, float b, float a)
Set the color of this arrow. Sets both the head and shaft color to the same value. Values are in the range [0, 1].
virtual bool setQuaternion(const Ogre::Quaternion &quaternion)
bool transform(const Header &header, const geometry_msgs::Pose &pose, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
Transform a pose from a frame into the fixed frame.
virtual FrameManager * getFrameManager() const =0
Return the FrameManager instance.
virtual void reset()
Called to tell the display to clear its state.
virtual void setOrientation(const Ogre::Quaternion &orientation)
Set the orientation.
FloatProperty * head_length_property_
ColorProperty * color_property_
#define ROS_WARN_ONCE_NAMED(name,...)
An object that displays a set of X/Y/Z axes, with X=Red, Y=Green, Z=Blue.
Ogre::SceneManager * scene_manager_
A convenience variable equal to context_->getSceneManager().
void updateAxisGeometry()
EnumProperty * shape_property_
virtual void setHidden(bool hidden)
Hide or show this property in any PropertyTreeWidget viewing its parent.
Property specialized for string values.
virtual void queueRender()=0
Queues a render. Multiple calls before a render happens will only cause a single render.
void updateColorAndAlpha()
bool validateQuaternions(const visualization_msgs::InteractiveMarker &marker)
FloatProperty * axes_radius_property_
QList< Property * > properties_
An arrow consisting of a cylinder and a cone.
void set(float length, float radius)
Set the parameters on this object.
bool initialized() const
Returns true if the display has been initialized.
Ogre::SceneNode * getSceneNode()
Get the scene node associated with this object.
virtual void setReadOnly(bool read_only)
Prevent or allow users to edit this property from a PropertyTreeWidget.
virtual int getOptionInt()
Return the int value of the currently-chosen option, or 0 if the current option string does not have ...
bool setStdString(const std::string &std_str)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
Show status level and text. This is thread-safe.
virtual QString getName() const
Return the name of this Property as a QString.
FloatProperty * head_radius_property_
virtual void onInitialize()
Override this function to do subclass-specific initialization.
PoseDisplaySelectionHandler(PoseDisplay *display, DisplayContext *context)
void getAABBs(const Picked &obj, V_AABB &aabbs)
Ogre::Entity * getEntity()