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

Controlling multiple joints at the same time

asked 2018-03-19 07:12:03 -0600

Tim Stadtmann gravatar image

updated 2018-03-28 07:52:46 -0600

Hi guys,

ROS supernoob here, apologies for that in advance.

I am currently trying to implement the end-effector control for a 7DOF robot arm in Gazebo. I have already figured out the inverse kinematics, and just need to send the joint goal positions to the seven joint controllers (which currently are effort controllers with the JointPositionController interface). Is there any way to control all joints at the same time besides switching to JointTrajectoryController? Or is the trajectory controller the right way to go even though I do not send trajectories but single points?

[EDIT] Stumbled upon another problem regarding this question. One of my goals is to control the arm with an external controller, e.g. a joystick. The output of the joystick will be interpreted as a velocity for the end-effector. As the JointTrajectoryController needs goal positions (using a pure 'velocity' trajectory is not possible), my only solution would be to calculate the goal position for each incoming velocity using a time estimate for how long the velocity will be applied (e.g. using the predicted time between two incoming velocity messages), and setting the time_from_start parameter accordingly. That solution feels kind of hacky.. are there any better ways? Direct velocity control, imo the intuitive solution, seems to be out of the question if the only sensible way to control multiple joints is the JTC...



edit retag flag offensive close merge delete


It may not be the only way, but I'd go for joint_trajectory_controller. It can do quite some nice things for you: interpolation, on-line trajectory replacement, etc. The fact that your trajectories will be only a single point doesn't matter. See also rqt_joint_trajectory_controller.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-20 03:10:58 -0600 )edit

Okay, thanks!

Tim Stadtmann gravatar image Tim Stadtmann  ( 2018-03-20 11:13:55 -0600 )edit

if the only sensible way to control multiple joints is the JTC...

I don't see anyone claiming that?

gvdhoorn gravatar image gvdhoorn  ( 2018-03-28 08:56:33 -0600 )edit

You might be interested in jog_arm. It's UR specific relatively generic, but will need a robot driver capable of accepting those msgs, but it's an example of a similar system as to what you are describing. It doesn't use ros_control though.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-28 09:14:37 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-22 04:54:42 -0600

pk gravatar image

JointTrajectoryController is a good way to command trajectories even when you know only the desired joint angles. This will give you an insight on how the trajectories are formed and This will inform you about how they are interpolated. The key thing is to have a valid time_from_start in trajectory_msgs/JointTrajectoryPoint when you are filling the trajectory_msgs/JointTrajectory message.

Other way is to use MoveIT! which takes care of planning and collision checking and also takes care of IK, but personally I find it slow.

edit flag offensive delete link more


+1 for the additional answer, but I must comment on your (implied) comparison of joint-level control with a robot motion planning framework such as MoveIt. Even conceptually they do not operate on the same level of abstraction.

And MoveIt will actually still require the JTC (or something similar).

gvdhoorn gravatar image gvdhoorn  ( 2018-03-22 05:55:03 -0600 )edit

Thanks for the additional clarification.

Tim Stadtmann gravatar image Tim Stadtmann  ( 2018-03-23 07:30:56 -0600 )edit

Question Tools



Asked: 2018-03-19 07:12:03 -0600

Seen: 1,324 times

Last updated: Mar 28 '18