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.
- Install Gazebo9.
- Quick YouTube tutorial for workspace setup.
Clone the repository inside the Documents
folder (or perform a commit on the repository)
- Open a terminal in
~/Documents/BFMC_Simulator/bfmc_workspace
directory and run the following command:
catkin_make
- Three folders –
src
,devel
,build
– will be generated inside thebfmc_workspace
directory. In order to make this workspace available, you need to source thesetup.bash
file in the same terminal.
source devel/setup.bash
- Gazebo needs to know where the workspace's packages and models are:
- export
models_pkg
to theGAZEBO_MODEL_PATH
variable - export the
src
folders toROS_PACKAGE_PATH
variable
- 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_Simulator/bfmc_workspace/src/models_pkg:$GAZEBO_MODEL_PATH"
export ROS_PACKAGE_PATH="/home/{YOUR_USER}/Documents/BFMC_Simulator/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] ERR
may appear. In order to solve it, see this thread.
- Open a terminal, navigate to the
~/Documents/BFMC_Simulator/startup_workspace
directory and run the following commands:
source ~/Documents/BFMC_Simulator/startup_workspace/devel/setup.bash
catkin_make
source devel/setup.bash
- With the simulator started, run the following command:
rosrun startup_package main.py
- Environmental elements added (people around the map)
- Ramp added;
- Made files executable. (BFMC_Simulator/startup_workspace/src/startup_package/src/main.py; BFMC_Simulator/bfmc_workspace/src/sim_pck/launch/bash_script/delay.sh; BFMC_Simulator/bfmc_workspace/src/traffic_light_pkg/src/tl_talker.py; BFMC_Simulator/bfmc_workspace/src/traffic_light_pkg/src/tl_listener.py)
- Fixed details in guide.
- Added highwy separators launchers.