- Implemented MPCC in ROS2 simulator.
- paper reference MPCC
- At every iteration,The dynamics and constraints has been linearized to formulate the problem as a QP, then used the HPIPM solver to obtain the locally optimal solution. Manual linearization helped reduce the solving time.
- Controller Dynamics has been modified to consider the computational latency of solver .
-
clone this reposittory
-
Prerequiste : follow this step to install docker and nvidia-docker toolkit docker&nvidia-docker
-
from root of directory:
- image build command : ./scripts/build/f1tenth.sh
- run the container : ./scripts/build/devel.sh
- if need to open multiple terminal in already running container do : docker exec -it <name_of_container> bash
-
In one terminal run :
bash ros2 launch f1tenth_gym_ros gym_bridge_launch.py -
In other terminal run :
bash ros2 launch pure_pursuit sim_pure_pursuit_launch.pyThis should run the pure pursuit with a deafult map
for obstacle(opponent) detection run the following launch file :
ros2 launch perception perception.launch.py
To Run the Model Predictive Contouring Control
ros2 launch mpcc_sim mpcc_sim.launch.py
-Currently MPCC subscribe to the "/perception/detection/raw_obstacles" to get the opponent pose but does not do obstacle avoidance
To run RRT, follow these steps:
-
Publish a drive command:
bash ros2 topic pub /opp_drive ackermann_msgs/msg/AckermannDriveStamped "{header: {stamp: {sec: 0, nanosec: 0}, frame_id: ''}, drive: {speed: 0.0, steering_angle: 0.0}}" -
bash ros2 launch f1tenth_gym_ros gym_bridge_launch.py -
bash ros2 launch rrt sim_rrt_launch.py( other opponent car will be treated as a static obstacle)
