Skip to content

lgsvl_interface: publish negative velocity when gear=REV

Description

Modify lgsvl_interface so that it publishes negative velocity when the vehicle moves backward.

This MR is needed for backward moving (for MPC/pure_pursuit). This is related to #535 (closed)

Following the current document, the controller assumes the negative velocity when the vehicle moves backward. https://autowarefoundation.gitlab.io/autoware.auto/AutowareAuto/vehicle-interface-reference-implementation.html

Same in the VehicleControlCommand as commented below.

# should be negative when reversed
float32 long_accel_mps2 0.0

Notes for Reviewer

For test of this MR: run the lgsvl_simulator with interface. Move the vehicle forward/backward and check the velocity in /vehicle/vehicle_kinematic_state is positive/negative correctly.

Checklist

  • Documentation was updated
Edited by takamasa horibe

Merge request reports