ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Subscribing action server message

asked 2016-06-14 03:37:22 -0500

Laurens Verhulst gravatar image

updated 2016-06-20 02:53:54 -0500


I am trying to simulate the Kinova Mico arm in a Gazebo simulation. I have everything working, executing paths calculated in Moveit. The only thing I have yet to simulate is the gripper. I am using the wpi_jaco package to communicate with the hardware arm, that we also have here. It uses an action server to actuate the fingers. It sends a control_msgs::GripperCommandActionGoal message to the goal topic.

What I want is to also receive the message and then convert the wanted position to an angle which I can publish to the controller topic. I wrote a normal subscriber to the topic but this isn't working. When building I get this error.

/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum<M>::value(const M&) [with M = double]’: /opt/ros/indigo/include/ros/message_traits.h:255:104:   required from ‘const char* ros::message_traits::md5sum(const M&) [with M = double]’ /opt/ros/indigo/include/ros/publisher.h:112:7:   required from ‘void ros::Publisher::publish(const M&) const [with M = double]’ /home/laurens/catkin_ws/src/mico_sim/mico_arm_gazebo/src/gazebo_rviz.cpp:95:35:   required from here /opt/ros/indigo/include/ros/message_traits.h:126:34: error: request for member ‘__getMD5Sum’ in ‘m’, which is of non-class type ‘const double’
 return m.__getMD5Sum().c_str();

How can I make it work? It is kind of urgent, so if someone can put me on the right track, I would be thankful.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-06-20 07:05:50 -0500

Laurens Verhulst gravatar image

Solved the issue. Had to do with data types not matching. A std_msgs::Float cannot be assigned to a normal float. Also had to specify the in order to write to it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-06-14 03:37:22 -0500

Seen: 622 times

Last updated: Jun 20 '16