This package contains a minimal wrapper around wrp_sdk and provides a ROS2 interface to hardware platforms from Weston Robot. Please first check if your device and environment are supported by the SDK and this ROS package before proceeding:
SDK Documentation and Sample Code can be found here
Supported Environments:
- Architecture: x86_64/arm64
- OS: Ubuntu 22.04
- ROS: Humble
Supported Robots:
- Refer to mobile_base for more details.
Supported Peripherals:
- Power Regulator V2.1
- Ultrasonic Sensor
- Hipnuc and WitMotion IMU
- NMEA-compatible GPS Receiver
- Lift Controller
More details can be found in the README inside individual src sub-folders
-
wrp_sdk >= v1.3.0 ... < v1.5.0 : please follow setup instructions from here
-
Peripheral driver dependencies (optional if you are not using peripherals):
$ sudo apt-get install -y software-properties-common $ sudo add-apt-repository ppa:lely/ppa $ sudo apt-get install -y pkg-config liblely-coapp-dev liblely-co-tools
-
Clone the packages into a colcon workspace and compile/source.
(the following instructions assume your colcon workspace is at: ~/ros2_ws/src)mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src git clone https://github.com/westonrobot/wrp_ros2.git cd .. colcon build --symlink-install . install/setup.bash
Only needed if you are using a CAN robot or peripheral
-
Enable gs_usb kernel module
$ sudo modprobe gs_usb
-
Bringup can device
NOTE: Adjust CAN bitrate accordingly. Refer to the tables in the mobile_base README and peripheral README for the correct bitrate.
$ sudo ip link set can0 up type can bitrate <bitrate> $ sudo ip link set can0 txqueuelen 1000
-
If no error occured during the previous steps, you should be able to see the can device now by using command
$ ifconfig -a
-
Install and use can-utils to test the hardware
$ sudo apt install can-utils
-
Testing command
# receiving data from can0 $ candump can0 # send data to can0 $ cansend can0 001#1122334455667788
Scripts are provided here for convenience. You can run "./setup_can2usb.bash" for the first-time setup and run "./bringup_can2usb_1m.bash" to bring up the device each time you unplug and re-plug the adapter.
You can find more information about robot base control from this page.
You may need to change run time parameters by editing the corresponding launch file
-
Mobile Base Node (and variants)
ros2 launch wrp_sdk_robot mobile_base.launch.py
-
Power Regulator Node
ros2 launch wrp_sdk_periph power_regulator.launch.py
-
GPS Receiver Node
ros2 launch wrp_sdk_periph gps_receiver_launch.py
-
IMU Sensor Node
ros2 launch wrp_sdk_periph imu_sensor_launch.py
-
Ultrasonic Sensor Node
ros2 launch wrp_sdk_periph ultrasonic_sensor.launch.py