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

Can Moveit-Python Interface be used to simulate actions taken by RL agent in Gazebo?

asked 2019-11-11 16:37:36 -0500

mkb_10062949 gravatar image

updated 2022-01-22 16:10:09 -0500

Evgeny gravatar image

I am doing a Project to coordinate two Universal Robots (UR5) using Reinforcement Learning Algorithms (Preferably by PPO i.e. Proximal Policy Optimization Technique). My question can Moveit - Python Interface be used for simulating the actions taken by the RL Agent in Gazebo? Moveit has an advantage that it has predefined FK (forward kinematics) and IK (inverse kinematics) solvers which would save a lot of coding. But is it recommended to use Moveit? Because I will be dealing with continuous state space and action spaces.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-11-12 14:48:06 -0500

mlautman gravatar image

MoveIt could certainly be useful for such a project but I would caution against using the python interfaces to do so. The python is a very limited interface that uses the move_group interfaces to get access to a subset of the useful code in moveit.

If it is possible for your project, I would recommend using the moveit c++ api directly including the pieces you need for your project (planning scene, robot_state, etc..) and avoiding the additional cruft of working through the python interfaces.

edit flag offensive delete link more

Comments

Hi thank you for your reply, by very limited interface what exactly do you refer to?

mkb_10062949 gravatar image mkb_10062949  ( 2019-11-12 15:01:41 -0500 )edit

The python interface is wrapped around c++ methods which use the ROS interfaces to interact with the move_group node. This node exposes a number of services which can be loaded and unloaded using pluginlib which can access the MoveIt C++ API directly. This works really well if you don't care about fast code and you want to do something vanilla such as moving a single robot in freespace. If on the other hand you want to do something more interesting such as moving two arms simultaneously, you will quickly find that the Python API is really limiting and adding new functionality will involve punching through a ton of layers of cruft just to get to the C++ api. For that reason, nearly all the maintainers bypass using the move_group node and the moveit_commander for all projects even slightly complex.

mlautman gravatar image mlautman  ( 2019-11-14 11:48:52 -0500 )edit

One very limiting factor that you will run into for your project is move group is setup to control one joint group at a time. If your two robot arms have overlapping workspaces and need to be executing motions simultaneously, you will need to do significant customization to ensure that the two arms will not collide. There are a number of projects that do this with MoveIt including bolt. (We have a private fork of Bolt that we've been developing into a product at PickNik).

mlautman gravatar image mlautman  ( 2019-11-14 12:08:28 -0500 )edit

Thank you so much for the clarification

mkb_10062949 gravatar image mkb_10062949  ( 2019-11-14 16:19:59 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-11-11 16:37:36 -0500

Seen: 369 times

Last updated: Nov 12 '19