Ask Your Question
0

MoveIt! Adding Collision Objects

asked 2017-02-27 07:18:05 -0500

Rhemus gravatar image

updated 2017-02-27 07:46:33 -0500

rbbg gravatar image

Hey guys, im trying to add some simple collision objects in Python to my planning scene in RViz to plan some trajectories with my UR5 Robot. I tried something like

scene = moveit_commander.PlanningSceneInterface()
p.pose.position.x = 0.4
p.pose.position.y = -0.2
p.pose.position.z = 0.3
scene.add_box("table", p, (0.5, 1.5, 0.6))

but this didnt work. Unfortunately the MoveIt! Tutorial is missing this part for Python (only got it for C++). Can anyone help please?

Im running ROS Indigo on Ubuntu 14.04.

edit retag flag offensive close merge delete

Comments

p.pose.orientation.w is probably initialised to 0. That is not a valid quaternion. Try setting w to 1 and see if that changes anything.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-27 07:51:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-02-27 07:53:04 -0500

rbbg gravatar image

Did you see this related question: #q209030 ? If that doesn't solve your problem: is this the complete code or just a small part? Also, did you see an error message of some sort?

edit flag offensive delete link more

Comments

Thanks i found the solution in the related question!

Rhemus gravatar image Rhemus  ( 2017-02-28 04:34:37 -0500 )edit

So what was the solution in the end?

gvdhoorn gravatar image gvdhoorn  ( 2017-02-28 04:52:34 -0500 )edit

I was missing some parts of the code. Just look at the answer on the linked question, there is the completed code and it worked for me.

Rhemus gravatar image Rhemus  ( 2017-02-28 05:23:21 -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-02-27 07:18:05 -0500

Seen: 3,868 times

Last updated: Feb 27 '17