rviz::RosTopicProperty for dynamixel ax-12a

asked 2017-01-06 08:06:39 -0500

inflo gravatar image

hi, i write a plugin for rviz (kinetic, ubuntu 16.04) and want to use rviz::RosTopicProperty, but i dont know how to use it with dynamixel_msgs/JointState ?

I got the header included and the code,:

#include <dynamixel_msgs/JointState.h>
topic_box_ = new rviz::RosTopicProperty(
      "ax12 Topics", "no default",
      ros::message_traits::datatype<dynamixel_msgs/JointState_>(),
      "dynamixel_msgs/JointState topic to subscribe to.",
      this, SLOT(updateTopic()));


error: parse error in template argument list
       ros::message_traits::datatype<dynamixel_msgs/JointState_>(),
                            ^
/home/ros/catkin_ws/src/finger_ctrl/src/teleop_panel.cpp:71:65: error: no matching function for call to ‘datatype()’
       ros::message_traits::datatype<dynamixel_msgs/JointState_>(),
                                                                 ^
In file included from /opt/ros/kinetic/include/ros/serialization.h:37:0,
                 from /opt/ros/kinetic/include/geometry_msgs/Twist.h:14,
                 from /home/ros/catkin_ws/src/finger_ctrl/src/teleop_panel.cpp:40:
/opt/ros/kinetic/include/ros/message_traits.h:235:20: note: candidate: template<class M> const char* ros::message_traits::datatype()
 inline const char* datatype()
                    ^
/opt/ros/kinetic/include/ros/message_traits.h:235:20: note:   template argument deduction/substitution failed:
/home/ros/catkin_ws/src/finger_ctrl/src/teleop_panel.cpp:71:65: error: template argument 1 is invalid
       ros::message_traits::datatype<dynamixel_msgs/JointState_>(),
                                                                 ^
In file included from /opt/ros/kinetic/include/ros/serialization.h:37:0,
                 from /opt/ros/kinetic/include/geometry_msgs/Twist.h:14,
                 from /home/ros/catkin_ws/src/finger_ctrl/src/teleop_panel.cpp:40:
/opt/ros/kinetic/include/ros/message_traits.h:262:20: note: candidate: template<class M> const char* ros::message_traits::datatype(const M&)
 inline const char* datatype(const M& m)
                    ^
/opt/ros/kinetic/include/ros/message_traits.h:262:20: note:   template argument deduction/substitution failed:
/home/ros/catkin_ws/src/finger_ctrl/src/teleop_panel.cpp:71:65: error: template argument 1 is invalid
       ros::message_traits::datatype<dynamixel_msgs/JointState_>(),
                                                                 ^
/home/ros/catkin_ws/src/finger_ctrl/src/teleop_panel.cpp:75:39: error: no matching function for call to ‘QHBoxLayout::addWidget(rviz::RosTopicProperty*&)’
   topic_layout->addWidget( topic_box_ );

                                   ^
edit retag flag offensive close merge delete