Control of Mobile Robots course project 2021/2022 - Politecnico di Milano.
- Insert the ROS packages car_traj_ctrl for the Bicycle Kinematic Model and car_simulator for the Single-Track Dynamic Model by typing:
 
  $ mv car_traj_ctrl <path>/catkin_ws/src
  $ mv car_simulator <path>/catkin_ws/src
- Go to your own catkin_ws folder in the system and recompile everything by doing:
 
  $ cd <path>/catkin_ws
  $ source ./devel/setup.bash
  $ catkin_make
- Then run 
ROS coreby typing: 
  $ roscore
- Open a new terminal and record the robot activity through a rosbag in this manner by reading the topic 
car_state: 
  $ cd <path>/catkin_ws/src/car_traj_ctrl/script
  $ rosbag record -O test_eight /car_state
- Open a new terminal and launch the robot simulation as:
 
  $ cd <path>/catkin_ws
  $ source ./devel/setup.bash
  $ roslaunch car_traj_ctrl test_car_eight.launch
- Go back to the terminal you ran 
rosbagand pressctrl + c - Do the same in the terminal which is running the robot simulation
 - Go back to the terminal where you stopped 
rosbagand run the following python script by typing on the bash: 
  $ python plot_result.py test_eight.bag 
- Now you can see the result produced by the execution you recorded.
 
- Open a new terminal and record the robot activity through a rosbag in this manner by reading the topic 
car_state: 
  $ cd <path>/catkin_ws/src/car_simulator/script
  $ rosbag record -O test_simple /car_state
- Open a new terminal and launch the robot simulation as:
 
  $ cd <path>/catkin_ws
  $ source ./devel/setup.bash
  $ roslaunch car_simulator test_car_simple.launch
- Go back to the terminal you ran 
rosbagand pressctrl + c - Do the same in the terminal which is running the robot simulation
 - Go back to the terminal where you stopped 
rosbagand run the following python script by typing on the bash: 
  $ python plot_result.py test_simple.bag 
- Now you can see the result produced by the execution you recorded.
 

