generated from LCAS/ros2-teaching-ws
-
Notifications
You must be signed in to change notification settings - Fork 7
ROS2 Gazebo Joint Trajectory Planning
francescodelduchetto edited this page Apr 18, 2024
·
2 revisions
-
if not already present, clone the repo:
git clone https://github.com/LCAS/RBT1001.git
NOTE: If you are on a Windows PC the following two additional steps are required before cloning:
- Open a terminal(e.g., window's powershell), type
git config --global core.autocrlf false
and press Enter - Make sure docker is running by launching the docker desktop application
- Open a terminal(e.g., window's powershell), type
-
Open a terminal and move to the RBT1001 folder; e.g.:
cd ~/RBT1001
-
git checkout tiago-gazebo
-
Now open the folder in VSCode and launch the webcontainer as usual.
- Open a terminal and launch
ros2 launch tiago_gazebo tiago_gazebo.launch.py moveit:=true
- Open the noVNC window with your browser. You should see the simulation of the robot running
- Launch rviz in another terminal for visualising the trajectories you plan before execution:
rviz2 -d src/week8/config/display_traj.rviz
You have to work on the week8/reach_configuration.py
script.
- execute the script. You will see it already provides an implementation of the trapezoidal trajectory for each joint so that they all start and end at the same time. The green rendering of the robot in rviz shows the execution of the trajectory before it is executed.
- if you close the plot with the trajectories, the robot will execute it.
Your Tasks:
- examine the code and check the implementation.
- Try changing the target position in the code and see if it can reach the desired configuration all the times.
Parts for the workshops are extracted, edited from and/or inspired by the following sources.
- Official ROS humble tutorials: https://docs.ros.org/en/humble/Tutorials.html
- Elephant Robotics docs: https://docs.elephantrobotics.com/docs/gitbook-en/