NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
robotdisplay.h
1 // Displays the robot in a pose defined by joint angles
2 // Author: Max Schwarz <max.schwarz@uni-bonn.de>
3 
4 #ifndef ROBOTDISPLAY_H
5 #define ROBOTDISPLAY_H
6 
7 #include <visualization_msgs/Marker.h>
8 #include <rviz/display.h>
9 
10 #include <urdf/model.h>
11 #include <rbdl/rbdl_parser.h>
12 
13 #include <ros/package.h>
14 #include <ros/console.h>
15 
16 namespace rviz { class Robot; }
17 
18 class RobotDisplay : public rviz::Display
19 {
20 public:
21  RobotDisplay(const boost::shared_ptr<urdf::Model>& model);
22  virtual ~RobotDisplay();
23 
24  virtual void onInitialize();
25  void update(std::vector<double> positions);
26 
27  //void update( float wall_dt, float ros_dt ) {ROS_INFO("Update");}
28  inline boost::shared_ptr<rbdl_parser::URDF_RBDL_Model> getRBDL() {return m_rbdl; }
29 
30 private:
31  boost::shared_ptr<urdf::Model> m_model;
32  boost::shared_ptr<rbdl_parser::URDF_RBDL_Model> m_rbdl;
33  rviz::Robot* m_robot;
34 
35  ros::Publisher marker_pub;
36  visualization_msgs::Marker marker;
37  ros::NodeHandle n;
38 };
39 
40 #endif