-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Milestone
Description
Description
In Triton AI Racer, we use tai_interface/msg/VehicleControl to control the vehilce actuators (steering, throttle, braking). To control a VESC, however, to be compatable with vesc_driver_node, we need to convert and publish std_msgs/msg/Float64 for individual actuators. A package called vesc_tai_interface is needed which contains a vesc_tai_interface_node that does the conversion.
Desired Behavior
Subscribers
- The node shall subscribe to a
tai_interface/msg/VehicleControltopic calledvehicle_cmd.
Publishers
- The node shall publish the following
std_msgs/msg/Float64topics:commands/motor/currentcommands/motor/brakecommands/motor/speedcommands/servo/position
Parameters
The node shall share most parameters with vesc_driver_node for the actuator mappings, namely,
brake_maxbrake_mincurrent_maxcurrent_minposition_maxposition_minservo_maxservo_minspeed_maxspeed_min
Read the source code to figure out their ranges and meanings.
In addition, the following three parameters are needed:
- 'servo_neutral
: the neutral steerign value might not be as simple as the average ofservo_minandservo_max`. Some steering mechanism would have a slight different neutral value. wheel_radius: useful for converting the speed invehicle_cmd(m/s) to RPMrpw_to_electrical_rpm_factor: Here is why this parameter exists.
The node should also support dynamic parameter configuration with parameter-change callback.
Logics
On receiving a vehicle_cmd,
- If
longitudinal_control_typeisLON_CTL_THROTTLE_BRAKE, map and publish the throttle (current) and brake values - If
longitudinal_control_typeisLON_CTL_SPEED, map and publish the speed value (remember to convert from m/s to electrical RPM) - If
lateral_control_typeis LAT_CTL_OPENLOOP, usesteering_openloopto map and publish steering- The mapping has two segments:
servo_mintoservo_neutral;servo_neutraltoservo_max, each corresponding to (-1, 0) and (0, 1) invehicle_cmd.steering_openloop.
- The mapping has two segments:
- If
lateral_control_typeis LAT_CTL_CLOSELOOP, throw an error. The VESC does not support closeloop steering at the moment.
Definition of Done
- Implement the node with basic message conversions
- Implement all parameters and parameter callback
- Test on a vehicle with
joy_nodeandjoy_tai_interfaceto teleop. - Convert this issue into a design document and put in the package (
vesc_tai_interface/design/README.md)
Metadata
Metadata
Assignees
Labels
No labels