ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

joint_states messages different

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

karlhm76 gravatar image

Hello,

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

header: 
  seq: 954
  stamp: 
    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

header: 
  seq: 228
  stamp: 
    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

Comments

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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Comments

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 -0500 )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 -0500 )edit

This is very useful information. Thanks so much

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

Question Tools

1 follower

Stats

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

Seen: 635 times

Last updated: Nov 24 '16