Ask Your Question
1

MoveIt Move only one Joint

asked 2017-10-21 06:41:32 -0500

sawsi gravatar image

Hello everybody,

Can someone tell me, how to move only one joint with MoveIt - Move Group Interface and not the end-effector pose.

Has someone experiences and can give me a some tips?

Thanks!

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
1

answered 2017-10-21 18:45:56 -0500

AndyZe gravatar image

updated 2017-10-21 18:48:35 -0500

Get the current joint values from your moveGroup (C++ version):

std::vector<double> joints;
joints = moveGroup.getCurrentJointValues();

Set whatever joint you want to change:

joints.at(y) = x.x;

Send the move command:

moveGroup.setJointValueTarget(joints);
moveGroup.move();
edit flag offensive delete link more

Comments

+1 This is probably the simplest way to do it. However, note that this actually sends target values for all joints in the group, using the current values as target. This is slightly different (depending on the driver) compared to requesting only one joint to move.

v4hn gravatar image v4hn  ( 2017-10-22 03:39:16 -0500 )edit
1

answered 2017-10-21 08:43:02 -0500

v4hn gravatar image

updated 2017-10-21 08:43:15 -0500

Add a move group, i.e. "JointModelGroup", in your srdf that contains only this one joint.

Afterwards you can set a joint target for this group via setJointValueTarget.

edit flag offensive delete link more
0

answered 2017-10-21 07:15:57 -0500

EdwinvanEmmerik gravatar image

Have you tried using this function?: moveit::planning_interface::MoveGroupInterface::setEndEffector (const std::string & eef_name)

Also it could be usefull to read through the api on http://moveit.ros.org/code-api/ Kind regards, Edwin van Emmerik

edit flag offensive delete link more

Comments

@EdwinvanEmmerik: I think the OP wants to move just a single joint, not the pose of the EEF. Can you clarify how the function you mention would help there?

gvdhoorn gravatar image gvdhoorn  ( 2017-10-21 08:28:35 -0500 )edit
-1

answered 2018-01-02 02:20:22 -0500

saurabh gravatar image

Hello Andy,

I tried same commands i.e. getCurrentJointValues() and setJointValueTarget(). But both commands doesn't seem to be working. I am not able to get the current joint values also. I checked with rosbag and came to know there are no messages when I am entering these movegroup commands. So can you please let me know how to debug, and give some hint, where should be some problem.

Saurabh

edit flag offensive delete link more

Comments

1

Please don't use an answer to ask a question. This isn't a forum. You can ask a new question and reference this question.

jayess gravatar image jayess  ( 2018-01-02 03:23:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-10-21 06:41:32 -0500

Seen: 1,172 times

Last updated: Jan 02 '18