First version of planning module.
In this scenario the planning module reads and reconstruct the official acceleration track according to FSG rules
and compute a basic trajectory to complete the track.
-
Main_LTP.py
: This module reads the cones position in the track and computes the middle trajectory for this competition providing position of plan points and desired acceleration.
The ROS node publishes on the topicltp_plan
the plan using theLPT_Plan.msg
. (In this scenario the plan does not changed so is published only once) -
ROS_Stp.py
: This module given the plan computed from the LTP module and current state of the car (position, velocity) computes the delta for the velocity and the steering angle.
The ROS node subscribes to the following topics:ltp_plan
,/carla/ego_vehicle/vehicle_status
. The first one is used to read the long term plan, while the second one is provided by the simulator and is exploited to read the current speed of the car. As far as concerns the car position, since no map is provided, the car position is retrieved from an instance of the car object in the simulator (CHEATING).
The node also publishes the short term plan in the topicstp_data
using theSTP_Data.msg
message. It provides 3 values:- status: racing (0), stop (1)
- psi: car orientation wrt z axis
- dt: delta theta = variation steering angle
- dv: delta velocity = variation wrt to current speed
Following the next steps is possible to run an instance of the planning module that interfaces with the Carla simulator.
- Start the simulator
- Start the
ROS_Stp.py
node - Start the
dispatcher.py
node - Start the
Main_LTP.py
node (NB. Due to a relative path run the rosnode whileplanning/
is the current working directoy)
Upon starting the ROS_Stp node will start reading the car speed and print some log info and send information on its topic.
Once the Main_LTP node sends the long term plan on the topic the ROS_Stp node will start computing the actual commands with a 5Hz rate
. The output will remain the same until some changes to the car status are made.