So, now we've seen how to perform grasping in MoveIt. But, what about applying this to the real robot? Well, actually, it's quite easy at this point.
First of all, we will execute the following commands in order to spawn a table and a grasping object into the simulation:
$ rosrun gazebo_ros spawn_model -database table -gazebo -model table -x 1.30 -y 0 -z 0 $ rosrun gazebo_ros spawn_model -database demo_cube -gazebo -model grasp_cube -x 0.65 -y 0.15 -z 1.07
We will end up with something like what's shown in the following screenshot:
Next, we will launch MoveIt with perception:
$ roslaunch myrobot_moveit_config myrobot_planning_execution.launch ...