Running fbot_simulation (Gazebo Classic) - fbotathome/fbot_learning GitHub Wiki

Installation

To set up the Gazebo Simulation follow these steps:

First, make sure you have installed ROS2 Humble and have a fbot_ws directory with /src, then proceed to install Gazebo using:

sudo apt update 
sudo apt upgrade
sudo apt install gazebo11
# If sudo apt install gazebo11 fails, try using:
sudo apt install gazebo

Navigate into the fbot_ws/src directory, then clone the necessary git repositories:

cd fbot_ws/src
git clone https://github.com/butia-bots/fbot_simulation.git
git clone https://github.com/butia-bots/fbot_description.git
git clone https://github.com/butia-bots/fbot_navigation.git
git clone https://github.com/butia-bots/fbot_manipulator.git

Following this, change to the branches that are being used for simulation:

cd fbot_description
git checkout feature/add-moveit-config
cd ..
cd fbot_manipulator
git checkout feature/boris-gazebo
cd ..
cd fbot_navigation
git checkout feature/navigation-with-slam
cd ...

After that, install the necessary packages:

sudo apt install ros-humble-nav2-bringup 
sudo apt install ros-humble-gazebo-ros-pkgs
sudo apt install ros-humble-topic-tools
sudo apt install ros-humble-moveit-common
sudo apt install ros-humble-moveit-visual-tools

Initialize rosdep inside your workspace, update it to fetch the latest package information and install the required ROS package dependencies:

sudo apt-get install python3-rosdep
sudo rosdep init 
rosdep update
rosdep install -i --from-path src --rosdistro humble -y

Besides that, follow the installation procedure of the x-series arm documentation to ensure that the arm acts as intended in the simulation:

curl 'https://raw.githubusercontent.com/Interbotix/interbotix_ros_manipulators/main/interbotix_ros_xsarms/install/amd64/xsarm_amd64_install.sh' > xsarm_amd64_install.sh
chmod +x xsarm_amd64_install.sh
./xsarm_amd64_install.sh -d humble

Once the dependencies are installed, proceed with building and sourcing the workspace:

sudo apt install python3-colcon-common-extensions
colcon build
source install/local_setup.zsh
source /opt/ros/humble/setup.zsh
source /usr/share/gazebo/setup.sh
export LC_NUMERIC="en_US.UTF-8"

Running the simulation

To run the simulation launch the gpsr file, using:

ros2 launch fbot_simulation gpsr.launch.py