How to Install gazebo_ros_pkgs from Source
Create a directory for the gazebo_ros_pkgs workspace :
1 | mkdir -p gazebo_ros_pkgs/src |
Copy this file, that gets gazebo_ros_pkgs and additional packages needed:
1 | cd gazebo_ros_pkgs |
Modify the file gazebo_ros_pkgs.repos, replace all the version by foxy.
1 | repositories: |
Note: The version tag in the yaml file indicates the branch we are checking out for a particular repository e.g. version: ros2 checks out the ros2 branch.
Get the packages into the src directory.
1 | vcs import src < gazebo_ros_pkgs.repos |
Switch to the branch matching your ROS distro.
1 | vcs custom --args checkout foxy |
Install all dependencies.
1 | rosdep install --from-paths src --ignore-src -r -y |
Then build all the packages.
1 | colcon build --symlink-install |
Note: Before building this ensure that the ROS 2 environment is sourced correctly.
Source this workspace’s install setup.
1 | source gazebo_ros_pkgs/install/setup.bash |