ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Using MoveIt programmatically and integrating with ros_control

asked 2016-10-23 06:49:29 -0600

t27 gravatar image

I have a question about using moveit for my custom 6 dof manipulator robot. I am pretty new to ROS, and I really hope to learn from the community.

Basically I want to go from a URDF file to actually programmatically sending commands to my robot after planning trajectories using moveit.

From the various tutorials, I have figured that this is what i have to do

  1. Generate the URDF from the CAD model using the Solidworks plugin.
  2. Use the URDF to generate a MoveIt package using the MoveIt setup assistant.
  3. Now if I wanted to use the GUI, I could import my model into RViz and manually execute the planning, but that's not what I want, I want to do so programmatically(ideally through python/rospy, but C++ is also OK)
  4. Use ROS control to write a driver interface for communicating to the actual hardware.

I have questions about Step 3 and 4.

How do I programmatically control my own robot?

The MoveIt MoveGroup tutorial here has an example of the API but critical things(like, how do I use my robot's files?) are not clear here. How do I import my robots files(or direct MoveIt to it) in the script to ensure the calculations are done properly? I understand MoveIt commander is the python interface, but is there any example using the MoveIt Commander and a description of its API? Could somebody link to Open source code for open robots that I can see and learn.

Can you link me to any code which runs on a robot other than the PR2, that I can run and test on my system?

Also, How do I connect Ros_control and MoveIt? I have looked into the ros control boilerplate repository which has some pointers on writing the driver, but I cant find any documentation on the interface between the two.

I want to use MoveIt for my custom robotic arm and have reached the stereotypical cliff that occurs after reading through and doing the common tasks in the various tutorials and videos on ROS.

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-10-23 13:25:21 -0600

JoshMarino gravatar image

updated 2016-10-23 15:43:40 -0600

I usually look at the API on Github for MoveIt commander here. You will most likely be wanting move_group.py for planning.

As for importing your robot files in the python script, you will already have move_group.launch running from the package created by MoveIt setup assistant. Then you load a planning group from the SRDF, which was launched from move_group.launch.

Here is a MoveIt tutorial for Baxter research robot. Here is one for UR5.

As for connecting to hardware, you usually just pass the trajectory to your controller. Depending on your robot, there may already exist motor drivers for it (i.e., Dynamixel motors).

edit flag offensive delete link more

Comments

1

This is helpful. In particular, the comment about move_group.py in moveit/moveit_commander/src/moveit_commander/ in the github repository.

Interestingly, the c++ MoveGroup class seems to have the get_named_targets() method we need, while the Python RobotCommander only has set_named_targets()...

NickCitizen gravatar image NickCitizen  ( 2017-09-05 22:13:16 -0600 )edit

Feel free to pull-request a patch that adds the methods. It simply wasn't added before because apparently nobody required it or was willing to write the code.

v4hn gravatar image v4hn  ( 2017-09-15 05:04:34 -0600 )edit

You are right in that it is not essential. I ended using the srdfdom package to get arround the lack of that particular method, code example available here: https://github.com/nickovaras/Vector_...

NickCitizen gravatar image NickCitizen  ( 2017-09-15 16:28:06 -0600 )edit
2

answered 2016-10-24 11:14:59 -0600

Dave Coleman gravatar image

For connecting ros_control to moveit, see https://github.com/ros-planning/movei...

edit flag offensive delete link more

Comments

Hi Dave,

Is there any example or doc showing how to use moveit_ros_control_interface? Thank you!

Fulin gravatar image Fulin  ( 2017-10-06 07:05:55 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-10-23 06:49:29 -0600

Seen: 3,266 times

Last updated: Oct 24 '16