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

How to feedback joint positions to MoveIt?

asked 2018-12-09 16:30:18 -0500

jcgarciaca gravatar image

I am working with a robot we built (with three joints), and control it through ROS such that everything goes well. However I have a doubt about how to properly feedback the joint states to moveit.

It is, currently I run demo.launch file and I created a node which subscribes to /joint_states topic and moves every motor to its own goal position (joint angle). Nevertheless, although I defined velocity in SRDF according with motors datasheets, I noted that robot in Rviz moves faster than real robot, such that trajectories (real and generated) mismatch. In order to avoid it, I just included a wait/sleep function to wait until every motor reaches its target before continuing to next position.

So, how could I feedback the current joint position directly to moveit and then to avoid the wait/sleep function?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-12-10 00:45:16 -0500

gvdhoorn gravatar image

updated 2018-12-10 00:45:50 -0500

Using joint_states for control is not the way things are meant to be done. As the name of the message implies, JointState messages are used to report on current state, not command a desired one.

You'll want to write a FollowJointTrajectory action server for your arm or re-use one, such as ros_control's joint_trajectory_controller. Re-use would be preferred if possible.

A JointTrajectory contains timestamps, positions, velocity and acceleration that, if properly used, should result in synchronised motion of all joints.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-12-09 16:30:18 -0500

Seen: 1,421 times

Last updated: Dec 10 '18