Ask Your Question
0

How to move specific joint only using MoveIt?

asked 2017-12-05 13:56:17 -0600

Ahmad gravatar image

I'm using MoveIt interface to control my Yumi Robot either by setting the joints value or the Pose values. What I need to do is changing the value of one joint only (joint-6) without changing the other joint values.

Thank you in advance.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2017-12-06 12:33:22 -0600

Ahmad gravatar image

I just solved it by some coding I get the current state of joints and copy them to a variable, and then just edit the needed joint only.

here is the code

std::vector<double> x;
group.getCurrentState() ->copyJointGroupPositions(group.getCurrentState() ->getRobotModel() ->getJointModelGroup(group.getName()), x);
x[/joint number/]=/value/;

The code is available in ROS book chapter 6 6.2 Planning to a joint goal

edit flag offensive delete link more
0

answered 2017-12-06 07:22:16 -0600

v4hn gravatar image

You can setup JointModelGroups (planning groups) for each single joint in your srdf to plan with these joints only.

How to actuate these trajectories on your robot arm depends on the concrete hardware driver. I've not worked with Yumi up to now, so I can't help you there.

edit flag offensive delete link more

Comments

Thank you for your answer, I've tried it work well with the simulation but when executing to the real robot it abort the execution process

Ahmad gravatar imageAhmad ( 2017-12-06 10:30:53 -0600 )edit
0

answered 2018-01-18 17:43:34 -0600

AndyZe gravatar image

MoveIt! added a method for this recently. Cool.

bool setJointValueTarget (const std::string &joint_name, double value)

edit flag offensive delete link more

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

Stats

Asked: 2017-12-05 13:56:17 -0600

Seen: 368 times

Last updated: Jan 18 '18