Car like robot is simulated in real life using ros2_control. This package contains urdf file for the car like robot.
pip3 uninstall serial
pip3 install pyserial==3.5
sudo apt install ros-humble-xacro
sudo apt install ros-humble-joint-state-publisher-gui
rosdep install --from-paths src --ignore-src -r -y
colcon build
source install/setup.bash
ros2 launch car_gazebo view_car.launch.py
set base_footprint as fixed_frame in rviz2
ros2 launch car_gazebo bringup_car.launch.py remap_odometry_tf:=true
set odom as fixed_frame in rviz2
ros2 run car_gazebo pose_receiver.py
ros2 control list_hardware_interfaces
command interfaces
bicycle_steering_controller/angular/position [unavailable] [unclaimed]
bicycle_steering_controller/linear/velocity [unavailable] [unclaimed]
virtual_front_wheel_joint/position [available] [claimed]
virtual_rear_wheel_joint/velocity [available] [claimed]
state interfaces
virtual_front_wheel_joint/position
virtual_rear_wheel_joint/position
virtual_rear_wheel_joint/velocity
ros2 control list_controllers
You should get
joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] active
bicycle_steering_controller[bicycle_steering_controller/BicycleSteeringController] active
ros2 topic pub --rate 30 /bicycle_steering_controller/reference geometry_msgs/msg/TwistStamped "
twist:
linear:
x: 1.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.1"
ros2 run teleop_twist_keyboard teleop_twist_keyboard