0
$\begingroup$

Rosanswers logo

Hi,

I want to use MoveIt! for pathfinding for a simple manipulator arm. The MoveIt! Setup Assistant and Rviz Integration tutorials were very helpful for the first usage of MoveIt! with the manipulator arm.

So far I can calculate paths between predefined poses using the Motion Planning extension. for Rviz

However, I now want to want to define a point in cartesian space. MoveIt! should then calculate a fitting manipulator pose itself and present a possible path from the current pose to the goal if there exists one.

I figured that this should be possible through the Move Group Interface of MoveIt! which I would then like to use with Python. This tutorial coveres this problem, I think. But I have no idea how to implement this for my own robot simulation.

Could someone explain me the steps that need to be done to transfer the tutorial on a different robot?


Originally posted by F4bich on ROS Answers with karma: 79 on 2016-08-08

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi

I am not very skilled with python but I am using move_group with c++. For implementig that tutorial on your robot. You just need to change this command.

group = moveit_commander.MoveGroupCommander("left_arm")

Instead of "left_arm" you should put name of your planning group which you specified in moveit_setup_assistant Next important thing is to change desired goal to the real position which could your manipulator really reach.

pose_target = geometry_msgs.msg.Pose()
pose_target.orientation.w = 1.0
pose_target.position.x = 0.7
pose_target.position.y = -0.05
pose_target.position.z = 1.1
group.set_pose_target(pose_target)

Remember as it was mentioned in tutorial trajectory will be just planned and not executed

Whole code could be found here https://github.com/ros-planning/moveit_pr2/blob/indigo-devel/pr2_moveit_tutorials/planning/scripts/move_group_python_interface_tutorial.py

When you will running code remember that your move_group should be running.


Originally posted by Chickenman with karma: 110 on 2016-08-08

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by F4bich on 2016-08-09:
Thanks for the answer. Is my move_group running when I visualize the manipulator using Rviz? So I would then only have to use: $ rosrun myscript.py To execute the script?

I get errors saying that the topic shut down unexpected, when I do this.

Comment by Chickenman on 2016-08-09:
your move group should be running when you call

roslaunch robot_moveit_config demo.launch

"robot_moveit_config" is name of your package you setuped in setup_assistant. If it still does not work you can send me your "robot_moveit_config" and I could try to move robot on my own using python

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.