-
Notifications
You must be signed in to change notification settings - Fork 0
Softie 101: Setup Rover ROS 2 Humble Environment
Download Ubuntu 22.04 image from here. For dual booting only.
Several options are available for installing Ubuntu:
-
Dual-boot: (Best imo!!!!!!)
More steps involved, but it offers the best option for running simulators, and interfacing with other external devices such as the jetson. -
VirtualBox:
(Windows/Linux) Slow but open-source and easy to install. Does not support Mac with Arm processors. -
VMWare:
(Windows/Mac/Linux) Requires creating a Broadcom account to download; marginally better than VirtualBox. VMWare Fusion supports Mac. -
WSL: (Windows) Fast but might have graphics compatibility issues with Gazebo.
ROS 2 Humble installation guide available here.
Colcon installation guide available here.
Colcon mixin repository https://github.com/colcon/colcon-mixin-repository.
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
colcon mixin update defaultUse the following command to install necessary packages
sudo apt install ros-humble-ros-ign* ros-humble-ros-gz* ros-humble-xacro \
ros-humble-joint-state-publisher ros-humble-joint-state-publisher-gui \
ros-humble-gazebo-msgs ros-humble-gazebo-plugins \
ros-humble-teleop-twist-keyboard ros-humble-ros2topicUseful for your .bashrc. Use with caution. Put the following lines in ~/.bashrc, don't run these line directly.
alias sros='source /opt/ros/humble/setup.bash && [ -f install/setup.bash ] && source install/setup.bash'
sros
alias kros='sudo pkill -f ros2; sudo pkill -f rviz; sudo pkill -f gazebo; sudo pkill -f gzserver; sudo pkill -f gzclient; sudo pkill -f ign; sudo pkill -f python3; sudo pkill -f rclpy; sudo pkill -f rosbridge'Useful for WSL:
# Adapter settings: AMD, Intel, NVIDIA
export MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA
export MESA_NO_VULKAN=1
export MESA_LOADER_DRIVER_OVERRIDE=iris
# Display settings: 0 - WSL, 1 - Windows
# export DISPLAY=:0
# export DISPLAY=$(ip route list default | awk '{print $3}'):0
# Software rendering: 0 - hardware, 1 - software
# export LIBGL_ALWAYS_SOFTWARE=1
unset LIBGL_ALWAYS_SOFTWARE
# Disable indirect rendering: 0 - enable, 1 - disable
# export LIBGL_ALWAYS_INDIRECT=1
# export LIBGL_ALWAYS_INDIRECT=0
Creating the Rover Work Space Directory
mkdir -p ~/rover25_ws #creating the rover25_ws directory at the home directory of the current user
cd ~/rover25_ws #entering the rover25_ws directory we have just created.Making a copy of the Rover Software 2025 Source Directory at rover25_ws directory we just created
git clone https://github.com/mcgill-robotics/rover-2025.git srcor if you are already in the McGill Robotics GitHub organization
git clone [email protected]:mcgill-robotics/rover-2025.git srcThen
cd ~/rover25_ws
colcon buildTest rviz
cd ~/rover25_ws
sros
ros2 launch sim rover_gz_sim.launch.py 
Test gazebo sim
cd ~/rover25_ws
sros
ros2 launch sim rover_gz_sim.launch.py 
If the simulation crashes, try:
echo "export LIBGL_ALWAYS_SOFTWARE=1" >> ~/.bashrc
source ~/.bashrcOnce Gazebo launches, you can control it with this ROS node:
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=/cmd_velBy the way, sros is source /opt/ros/humble/setup.bash && [ -f install/setup.bash ] && source install/setup.bash.
https://moveit.picknik.ai/humble/doc/tutorials/getting_started/getting_started.html