Ask Your Question
1

How can I move my arm between two points using moveit commandator

asked 2013-10-29 19:17:46 -0600

unais gravatar image

updated 2013-11-14 10:40:37 -0600

tfoote gravatar image

Hi

I am created a moveit plugin for my 6DOF arm.And I am trying to move my arm through a line. And I have two end co-ordinates of a line say (x1,y1,z1) and (x2, y2, z2) .

I can able to move to a random pose using

from moveit_commander import MoveGroupCommander

#if name == '__main__':
group = MoveGroupCommander("arm")

# move to a random target
group.clear_pose_targets()
group.go()

But I am not found a function that helps me to plan between two points.

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-10-29 19:27:44 -0600

lindzey gravatar image

1) here is the code defining the MoveGroupCommander class

2) I'd recommend playing around with this (and any python code that you want to explore) in a REPL that has autocomplete (ipython is good). From there, you can see what functions exist for group by typing group.-[tab] , and what their arguments are by typing group.set_pose_target(-[tab].

3) To answer your direct question, this should work:

group.set_position_target([x, y, z])
group.go()
edit flag offensive delete link more

Comments

Thanks lindzey

unais gravatar imageunais ( 2013-10-29 19:51:22 -0600 )edit

hi lindzy .. I can able to set the target. But how can I know which is the origin (0,0,0)

unais gravatar imageunais ( 2013-10-30 19:36:39 -0600 )edit
0

answered 2013-10-29 19:42:35 -0600

130s gravatar image

In addition to instructive answer from @lindzey, I've made a sample code (link). Although the document is for a particular 6DOF robot called Hiro, you can play with this sample code on your robot too where MoveGroupCommander.get_random_pose() gives random pose and you can investigate what inside of pose looks like.

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: 2013-10-29 19:17:46 -0600

Seen: 707 times

Last updated: Oct 29 '13