33 #include <OGRE/OgreSceneNode.h> 34 #include <OGRE/OgreSceneManager.h> 50 #include <boost/foreach.hpp> 51 #define foreach BOOST_FOREACH 85 "Render detection sensor type as text below detected object",
this, SLOT(
stylesChanged()));
89 "Render pose for detected object",
this, SLOT(
stylesChanged()));
135 for (std::vector<tuw_object_msgs::ObjectWithCovariance>::const_iterator detected_object_it = msg->objects.begin();
136 detected_object_it != msg->objects.end(); detected_object_it++)
142 if(msg->type == tuw_object_msgs::ObjectDetection::OBJECT_TYPE_PERSON)
146 else if(detected_object_it->object.shape == tuw_object_msgs::Object::SHAPE_DOOR)
150 else if(detected_object_it->object.shape == tuw_object_msgs::Object::SHAPE_TRAFFIC_CONE)
159 tuw_object_msgs::ObjectWithCovarianceConstPtr detected_object =
161 new tuw_object_msgs::ObjectWithCovariance(*detected_object_it));
166 Ogre::Quaternion orientation;
167 Ogre::Vector3 position;
173 ROS_DEBUG(
"Error transforming from frame '%s' to frame '%s'", msg->header.frame_id.c_str(),
181 detected_object_visual->setFramePosition(Ogre::Vector3(0, 0, 0));
182 detected_object_visual->setFrameOrientation(Ogre::Quaternion(1, 0, 0, 0));
183 detected_object_visual->setTransform(position, orientation);
184 detected_object_visual->setMessage(detected_object);
186 visual_.push_back(detected_object_visual);
rviz::BoolProperty * render_sensor_type_property_
rviz::BoolProperty * render_ids_property_
void processMessage(const tuw_object_msgs::ObjectDetection::ConstPtr &msg)
Ogre::ColourValue getOgreColor() const
virtual void onInitialize()
virtual void stylesChanged()
DisplayContext * context_
Ogre::SceneNode * scene_node_
virtual bool getBool() const
rviz::BoolProperty * render_covariances_property_
virtual void addOption(const QString &option, int value=0)
rviz::BoolProperty * render_pose_property_
virtual FrameManager * getFrameManager() const =0
virtual void onInitialize()
rviz::EnumProperty * style_property_
virtual Ogre::SceneManager * getSceneManager() const =0
bool getTransform(const Header &header, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
virtual ~ObjectDetectionDisplay()
virtual int getOptionInt()
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
rviz::ColorProperty * color_property_
std::vector< boost::shared_ptr< ObjectDetectionVisual > > visual_