A project implementing four controllers for a vehicle in the AWSIM environment using ROS2 Humble.
- Enter the autoware container -> run_x86.sh
- cd ~/autoware/src
- git clone https://github.com/mgmike1011/tswr_awsim
- cd ..
- colcon build --packages-select tswr_awsim
- . install/setup.bash
Run all comands inside docker container
pip install drake
- Start AWSIM simulator
foo@bar:~/autoware$ cd f1tenth_simulators/F1Tenth_v0.5
foo@bar:~/autoware/f1tenth_simulators/F1Tenth_v0.5$ ./F1Tenth_v0.5.x86_64
- Start path publisher
foo@bar:~/autoware$ ros2 run tswr_awsim path_publisher
- Start iLQR planning algorithm
foo@bar:~/autoware$ ros2 run tswr_awsim iLQR_controller
Computing steering angle and acceleration (with some limitations) based on current pose and a reference trajectory. The controller uses linearized model of vehicle kinematics to predict future state. It solves a discrete-time algebraic Riccati equation (DARE) to obtain the optimal feedback gain matrix K, which is used to compute optimal control input.
- Start AWSIM simulator
foo@bar:~/autoware$ cd f1tenth_simulators/F1Tenth_v0.5
foo@bar:~/autoware/f1tenth_simulators/F1Tenth_v0.5$ ./F1Tenth_v0.5.x86_64
- Start Linearized Model Predictive Control algorithm:
foo@bar:~/autoware$ ros2 launch tswr_awsim lin_MPC_launch.py
Computing steering angle using vehicle kinematics (with wheelbase 0.33 m), reference path and lookahaead distance 0.7 m. Equations correspond to a vehicle model with reference point in the center of the rear axle.
- Start AWSIM simulator
foo@bar:~/autoware/f1tenth_simulators/F1Tenth_v0.5$ ./F1Tenth_v0.5.x86_64
- Start Pure Pursuit algorithm:
foo@bar:~/autoware$ ros2 launch tswr_awsim pure_pursuit_launch.py
Computing steering angle using the heading error and cross-track error. In this method, the cross-track error is defined as the distance between the closest point on the path with the front axle of the vehicle.
- Start AWSIM simulator
foo@bar:~/autoware/f1tenth_simulators/F1Tenth_v0.5$ ./F1Tenth_v0.5.x86_64
- Start Stanley algorithm:
foo@bar:~/autoware$ ros2 launch tswr_awsim stanley_launch.py
- Agnieszka Piórkowska
- Miłosz Gajewski
- Maciej Mirecki
- Mikołaj Zieliński
Politechnika Poznańska 2023