Using ROS demo

Pre-launch Check

Tip Please first acquire basic knowledge of ROS. You can refer to the ROS1 Tutorial and ROS2 Tutorial to understand the common conventions of the ROS system.

Please ensure the following are completed:

  1. ROS-SDK installation is complete; if it is your first time installing the SDK, it is recommended to restart after the first installation.

  2. Compilation has been completed without errors.

  3. The workspace has been sourced.

  4. If using the CAN-COM HUB, ensure the CAN bus is correctly connected and devices can be detected.

    • Use lsusb in the terminal to see the following devices.
  5. Ensure the remote control is turned off; or if it is on, ensure it is set to CAN mode.

    For information about the remote control and modes, please refer to the remote control section in the product user manual.


Chassis Devices

Warning Be cautious, when attempting to control the robot with software for the first time, ensure there are no obstacles within the robot's range of motion, or elevate the robot.

There are two test demos for the chassis:

* demo_basic_ctrl.launch
* demo_key_ctrl.launch

demo_basic_ctrl.launch is a standard launch file that can be used directly with autonomous driving, controlling the robot's movement via the /cmd_vel topic.

demo_key_ctrl.launch supports keyboard control, using turtle_teleop_key to control the robot with the keyboard. If you have not yet seen the ROS turtlesim tutorial, please check it out first.

Tip Note that the movement is not controlled with the arrow keys, please check the usage tips printed in the terminal and press the forward button indicated.

Successful launch will display the following terminal message

startup.png

For parameter settings and communication msg in the launch file, please refer to the src/drivers/xpkg_vehicle/README.md file, below are explanations of a few key parameters:

!!!note If the chassis cannot be controlled, it may be because mode_can_lock is set to false, and it has been switched to another mode.

After successfully launching the package, you can view ROS topics through rostopic list, below are a few key topics:


版本号 #4
由 Yangfan He 创建于 12 七月 2024 11:05:41
由 Yangfan He 更新于 12 七月 2024 11:58:13