This is the repository for Mobile System Control lecture
- Download CARLA: Mobile System Control package version of CARLA simulator
- Launch CARLA
./CarlaUE4.sh
- Check the directory of Python API in CARLA simulator
- Add PYTHONPATH in ~/.bashrc or ~/.zshrc
-
bash
echo "PYTHONPATH=$PYTHONPATH:~/Downloads/CARLA_package/CARLA/PythonAPI/carla/dist/carla-0.9.15-py3.8-linux-x86_64.egg:~/Downloads/CARLA_package/CARLA/PythonAPI/carla/" >> ~/.bashrc
-
zsh
echo "PYTHONPATH=$PYTHONPATH:~/Downloads/CARLA_package/CARLA/PythonAPI/carla/dist/carla-0.9.15-py3.8-linux-x86_64.egg:~/Downloads/CARLA_package/CARLA/PythonAPI/carla/" >> ~/.zshrc
- Setup catkin build
- Change catkin_make workspace to catkin build
pip3 install pip --upgrade pip3 install -U catkin_tools cd ~/catkin_ws/src rm CMakeLists.txt cd .. rm -rf build devel mkdir build devel install logs catkin init catkin build
- Build Packages
- Install external library for QP solver and CARLA messages
cd ~/catkin_ws/src git clone https://github.com/rise-lab-skku/Mobile_System_Control.git cd Mobile_System_Control sudo ./install.sh
- Build packages
catkin build
- Launch carla_ros_bridge
roslaunch carla_ros_bridge carla_ros_bridge.launch
- Launch mobile_system_control
roslaunch mobile_system_control mobile_system.launch
roslaunch mobile_system_control_vis mobile_system_control_vis.launch
- Spawn vehicle and control window
roslaunch carla_spawn_objects carla_spawn_objects.launch objects_file_name:=ego
roslaunch carla_manual_control carla_manual_control.launch role_name:=ego_vehicle
- Launch control examples
- PID controller
roslaunch PID_control_ex PID.launch
- Pure Pursuit controller
roslaunch PurePursuit_control_ex PurePursuit.launch
- Kanayama controller
roslaunch Kanayama_control_ex Kanayama.launch
- MPC controller
roslaunch MPC_control_ex MPC.launch
- PID controller