32 #include <OGRE/OgreSceneNode.h> 33 #include <OGRE/OgreSceneManager.h> 54 "Scale of the pose's pose.",
60 "Color to draw the pose's pose.",
65 "The amount of seconds in which a robot is still displayed after it does not publish anymore. This value should be greater or equal than 1.",
73 "The number of pose measurements that should be kept for each robot. Make sure that it is greater than 0.",
82 "A tree view of all the available robots",
94 Ogre::Quaternion orientation(1.0,0.0,0.0,0.0);
95 Ogre::Vector3 position(0,0,0);
98 ROS_DEBUG (
"Error transforming from frame '%s' to frame '%s'",
99 msg->header.frame_id.c_str(), qPrintable (
fixed_frame_ ) );
115 std::unique_ptr<rviz::BoolProperty> bp;
118 QString(
"display this robot?"),
122 bool_properties_.insert(std::pair<std::string,std::unique_ptr<rviz::BoolProperty>>(msg->robot_name, std::move(bp)));
151 visual_->setScalePose ( scale );
157 visual_->setColorPose ( color );
165 if(!it.second->getBool())
167 visual_->disableRobot(it.first);
169 visual_->enableRobot(it.first);
void onKeepAliveChanged()
void updateBoolProperty()
virtual void onInitialize()
virtual void onInitialize()
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
DisplayContext * context_
std::map< std::string, std::shared_ptr< rviz::BoolProperty > > bool_properties_
std::shared_ptr< rviz::IntProperty > keep_alive_
Ogre::SceneNode * scene_node_
std::shared_ptr< MultiRobotInfoVisual > visual_
std::shared_ptr< rviz::ColorProperty > property_color_pose_
std::shared_ptr< rviz::IntProperty > keep_measurements_
virtual FrameManager * getFrameManager() const =0
virtual Ogre::SceneManager * getSceneManager() const =0
std::shared_ptr< rviz::Property > robot_bool_properties_
virtual ~MultiRobotInfoDisplay()
ros::Subscriber sub_robot_info_
bool getTransform(const Header &header, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
std::shared_ptr< rviz::FloatProperty > property_scale_pose_
void onKeepMeasurementsChanged()
void callbackRobotInfo(const tuw_multi_robot_msgs::RobotInfoConstPtr &msg)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
void processMessage(const tuw_multi_robot_msgs::RobotInfoConstPtr &msg)