Ask Your Question

joint_states messages different

asked 2016-11-22 22:07:45 -0600

karlhm76 gravatar image


I have a custom 6DOF arm that I'm trying to interface with moveit. I have created the URDF and the model, and I have loaded it into rviz.

I have made a lot of progress with it I think. I'm using ros indigo on ubuntu 14.04

I subscribe to the joint_states topic on my arduino. Using the arduino code I am able to individually control each joint using the joint state sliders when I run the display.launch

I've completed the moveit configuration and it loads with no problems in rviz, and I can plan movements, etc.

however when my arduino subscribes to the joint_states topic at this point, I get errors in rosserial saying [ERROR] [WallTime: 1479872259.522084] Message from ROS network dropped: message larger than buffer.

What is different with these messages than the ones generated from display.launch?

I performed some investigation and found something interesting:

This is the message from when I use moveit demo.launch

  seq: 954
    secs: 1479873407
    nsecs: 957350015
  frame_id: ''
name: ['shoulder_base', 'upper_arm_shoulder', 'elbow_upper_arm', 'forearm_elbow', 'wrist_forearm', 'gripper_wrist', 'left_jaw_gripper', 'right_jaw_gripper']
position: [4.435017290525138e-05, 9.012486469545027e-05, 3.372531827300197e-05, 5.395870120266208e-05, 4.7403243313592324e-05, 0.8750411991072651, 0.0, 0.0]
velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
effort: []

and this is the message when I use display.launch

  seq: 228
    secs: 1479873728
    nsecs: 257888078
  frame_id: ''
name: ['shoulder_base', 'upper_arm_shoulder', 'elbow_upper_arm', 'forearm_elbow', 'wrist_forearm', 'gripper_wrist', 'left_jaw_gripper', 'right_jaw_gripper']
position: [0.0, 0.0, 0.0, 0.0, 0.0, 1.2491756999999999, 0.0, 0.0]
velocity: []
effort: []

why the differences, and more importantly, can I make the position data the same data types/precision?

edit retag flag offensive close merge delete


Not an answer, but: JointState msgs are really typically used for reporting joint states, not for controlling them. Look into JointTrajectory and the related action servers. Ideally: write a hardware_interface for your controller and use ros_control. The JointState msgs ..

gvdhoorn gravatar image gvdhoorn  ( 2016-11-23 04:39:37 -0600 )edit

.. that you are seeing are probably those published by one of the fake controllers in MoveIt, which are just there to make it possible to visualise things without needing real hardware.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-23 04:40:27 -0600 )edit

Thanks for the info. Yes I've been reading about this. I was simply trying to get the thing to work as easily as possible. I was reading that the fake controller published joint states and i already had something that worked with them, or so i thought.

karlhm76 gravatar image karlhm76  ( 2016-11-23 05:12:38 -0600 )edit

I've been having a few problems with getting started with the trajectory action server and catkin and netbeans. Not relevant here though. Even though I've made good progress with the setup I'm still fairly new at this.

karlhm76 gravatar image karlhm76  ( 2016-11-23 05:15:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-24 03:56:58 -0600

karlhm76 gravatar image

I've decided to look into writing an action server for FollowJointTrajectory.

See how it goes I guess. Thanks again.

edit flag offensive delete link more


I'd really encourage you to take a look at writing a hardware_interface for your Arduino setup. Take a look at ros_control_boilerplate by Dave Coleman. If you have communication with your Arduino setup, it shouldn't be too difficult.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-24 06:19:35 -0600 )edit

After you have the hardware interface implemented, you can re-use the ros_control action server (the joint_trajectory_controller) without writing any additional code.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-24 06:20:33 -0600 )edit

This is very useful information. Thanks so much

karlhm76 gravatar image karlhm76  ( 2016-11-25 18:44:27 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2016-11-22 22:07:45 -0600

Seen: 352 times

Last updated: Nov 24 '16