Skip to content

Constant Speed

Brian Goldfain edited this page Aug 10, 2016 · 4 revisions

The constant speed controller uses a PID controller to control the speed of a real or simulated AutoRally platform to a user defined value in the speedCommand message. The throttle set point for a given speed comes from a throttle calibration file that maps servo command values to steady state vehicle speeds. The default calibration file is autorally_util/config/throttlePositionCalibration.yaml.

Before launching, ensure that runstop shown in the upper right corner of the OCS, also viewable in the chassisState message, is true (1). With a physical platform, throttleRelayEnable and autonomousEnable must also be true (1) to enable autonomous motion.

The speed is controlled by publishing a target speed message of type std_msgs::Float64 to the topic /constantSpeedController/speedCommand at 10Hz, setting the data field to your desired speed in m/s (3 is a godo place to start). An easy way to do this is with rqt_publisher.

Launch the constant speed controller with the following command:

roslaunch autorally_control constantSpeedController.launch