0
$\begingroup$

Rosanswers logo

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?


Originally posted by jcgarciaca on ROS Answers with karma: 67 on 2018-12-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2018-12-10

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.