Logitech G29+Carla+real car twist control each other and joint debugging of the three

insert image description here

1. Logitech controls the real car

(1) Convert Logitech message to Joy: ROS official node Node
name: joy_node
Release:
Topic name: G29/joy
Message type: sensor_msgs/Joy
float32[] axes
int32[] buttons
(2) Joy is converted to Twist speed node and sent to Real vehicle
Node name: joy_to_control
Subscribe:
Topic name: G29/joy
Message type: sensor_msgs/Joy
float32[] axes
int32[] buttons
Publish:
Topic name: /twist_cmd
Message type: Twist

2. Real car control Carla

(1) Vehicle feedback speed Twist_feedbac_cmd is converted into Carla’s speed information
Node name: cmd_vel_to_can
Subscribe:
Topic name: twist_cmd_feedback
Message type: Twist
Publish:
Topic name: /carla/ego_vehicle/vehicle_control_cmd
Message type: CarlaEgoVehicleControl

3. Carla controls Logitech

(1) Force Feedback Node: Convert Carla’s status information to Logitech’s steering wheel information
Node Name: carla_ff_node
Release:
Topic Name: /ff_target
Message Type: ForceFeedback
float32 position
float32 torque

4. Logitech controls Carla

(1) Convert Logitech's steering wheel information to Carla's speed information
python file: manual_control_steeringwheel.py

5. Carla controls the real vehicle

(1) Convert the status information of carla to the Twist speed of the real vehicle
Node name: twist_to_control
Subscribe:
Topic name: /carla/hero/vehicle_status
Message type: CarlaEgoVehicleStatus
Publish:
Topic name: /twist_cmd
Message type: Twist

6. Real car control Logitech

(1) Force Feedback Node: convert the Twist speed of the real vehicle into Logitech steering wheel information
Node Name: twist_to_control
Subscribe:
Topic Name: /twist_cmd_feedback
Message Type: Twist
Publish:
Topic Name: /ff_target
Message Type: ForceFeedback

Guess you like

Origin blog.csdn.net/justinyjf/article/details/131752289