ROS2 simulation of a camera using gazebo and rviz2
This repository contains code for a ROS2 Gazebo simulation using the Humble Hawksbill version on Ubuntu 22.04 Jammy Jellyfish. The simulation utilizes Gazebo as the simulator and rviz2 as the visualizer.
This project was inspired by and based on the work of this repo [https://github.com/joshnewans/urdf_example]
- ROS2 Humble Hawksbill
- Ubuntu 22.04 Jammy Jellyfish
- Gazebo
- xacro
- Create a workspace inside home (~)
mkdir camera_simulation_ws
- Go inside the ws and create a src folder
cd camera_simulation_ws
git clone https://github.com/DanaWentBananas/SimulationGazeboCamera.git
-
Change the folder name from SimulationGazeboCamera to src
-
Go back to the ws
cd ..
OR
cd path_to/map_ws
- build it
colcon build
- source !!
sudo vim ~/.bashrc
inside the file add these lines:
source /opt/ros/humble/setup.bash
source ~/camera_simulation_ws/install/setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
To run the simulation, follow the steps below:
ros2 launch launch_pkg demo_robot_gazebo.launch.py