This project contains code examples created in Visual Studio Code for Computer Vision using C++ & OpenCV & Point Cloud Library (PCL) using ROS2. These examples are created for the Computer Vision Subject of Robotics Software Engineering Degree at URJC.
This package allows running different Gazebo worlds, including the AWS Robomaker worlds, using the Tiago robot from PAL Robotics
Source your ROS2 distro:
source /opt/ros/<ros2-distro>/setup.bash
Execute installation script:
./setup.sh
source install/setup.sh
ros2 launch computer_vision simulation.launch.py
To change the Gazebo world or the initial position/rotation of the Tiago robot, you can modify the config/params.yaml
file.
If you have a low performance, close the Gazebo's client. Check gzclient process, and kill it:
kill -9 `pgrep -f gzclient`
You can use Nav2 using Tiago in the selected world:
source install/setup.sh
ros2 launch computer_vision tiago_navigation.launch.py
Also, you can use Keepout Zones, just create a new map including the excluded areas, and use the same name adding _keep
, now publish the map running:
source install/setup.sh
ros2 launch computer_vision keepzone.launch.py
Just some AWS worlds are included. You can Navigate While Mapping and create your own map using the SLAM Toolbox provided. In different terminals:
- Run the SLAM Toolbox:
ros2 launch slam_toolbox online_async_launch.py params_file:=install/slam_toolbox/share/slam_toolbox/config/mapper_params_online_async.yaml use_sim_time:=true
In slam_toolbox/config/mapper_params_online_async.yaml change scan_topic from /scan to /scan_raw
- Activate the map server:
ros2 launch nav2_map_server map_saver_server.launch.py
- Check the map in RViz:
rviz2 --ros-args -p use_sim_time:=true
- Save the map:
ros2 run nav2_map_server map_saver_cli --ros-args -p use_sim_time:=true
- OpenCV node
source install/setup.sh
ros2 run computer_vision cv_node
- PCL node
source install/setup.sh
ros2 run computer_vision pcl_node
- OpenCV & PCL node
source install/setup.sh
ros2 run computer_vision cv_pcl_node
You can check the commands
file to run other nodes, such as key_teleop
to move Tiago using your keyboard.
This is a project made by José Miguel Guerrero, Associate Professor at Universidad Rey Juan Carlos. Copyright © 2022.
Shield:
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.