So, at this point, we've seen some methods that allow us to plan a trajectory with Python code. But, what about executing this trajectory with the real robot? In fact, it's very simple. In order to execute a trajectory, we just need to call the go() function from the planning group, like this:
By executing this line of code, we will be telling our robot to execute the last trajectory that has been set for the planning group.
First of all, we'll need to launch the MoveIt RViz environment by executing the following command:
$ roslaunch fetch_moveit_config fetch_planning_execution.launch
We will create a new Python script called execute_trajectory.py and copy the code from joint_planning.py before ...