There are two workspaces:
bfmc_workspace, which contains the necessary files for running the simulatorstartup_workspace, where we provided some useful libraries for running your Python code in the Gazebo simulator
- Install Ubuntu 18.04.5 LTS (Bionic Beaver). For best performances, avoid using a virtual machine.
- Install ROS Melodic. We suggest using the Desktop Full Install. Make sure you follow all the instructions and pay attention to the Initialize rosdep subchapter.
Both workspaces should be stored inside the Documents folder.
- Open a terminal in
bfmc_workspacedirectory and run the following command:
catkin_make- Three folders –
src,devel,build– will be generated inside thebfmc_workspacedirectory. In order to make this workspace available, you need to source thesetup.bashfile in the same terminal.
source devel/setup.bash- Gazebo needs to know where the workspace's packages and models are:
- export
models_pkgto theGAZEBO_MODEL_PATHvariable - export the
srcfolders toROS_PACKAGE_PATHvariable
- export
# You can either run these commands each time you want to use the workspace, or add them to the end of the `~/.bashrc` file and source it.
# Don't forget to replace {YOUR_USER} with your actually user name
export GAZEBO_MODEL_PATH="/home/{YOUR_USER}/Documents/bfmc_workspace/src/models_pkg:$GAZEBO_MODEL_PATH"
export ROS_PACKAGE_PATH="/home/{YOUR_USER}/Documents/bfmc_workspace/src:$ROS_PACKAGE_PATH"- Finally, try running the following command:
# Depending on your machine, it may take 1 to 3 minutes for the world to completely load.
roslaunch sim_pkg map_with_all_objects.launch- The
[REST.cc:205] ERRmay appear. In order to sove it, see this thread.
- Open a terminal, navigate to the
startup_workspacedirectory and run the following commands:
source ~/Documents/bfmc_workspace/devel/setup.bash
catkin_make
source devel/setup.bash- With the simulator started, run the following command:
rosrun startup_package main.py