3 Getting Started
This section introduces the basic operation and development of the BUNKER platform using the CAN bus interface.
3.1 Use and operation
Check
Check the condition of vehicle body. Check whether there are significant anomalies; if so, please contact the after-sale service personnel for support;
Check the state of emergency stop switches. Make sure Q6 emergency stop button at the rear is released;
For first-time use, check whether Q3 (drive power supply switch) on the rear panel has been pressed down; if so, please release it, and then the drive will be powered off;
Startup
Press the key switch (Q2 on the electrical panel), and normally, the voltmeter will display correct battery voltage and front and rear lights will be both switched on;
Check the battery voltage. If the voltage is higher than 48V, it means the battery voltage is correct; if the battery power level is low, please charge the battery;
Shutdown
Press the key switch to cut off the power supply;
Emergency stop
Press down emergency push button at the rear of BUNKER vehicle body;
Basic operating procedure of remote control
After the chassis of BUNKER mobile robot is started correctly, turn on the RC transmitter and select the remote-control mode. Then, BUNKER platform movement can be controlled by the RC transmitter.
3.2 Charging
BUNKER is equipped with a standard charger by default to meet customers' recharging demand.
The detailed operating procedure of charging is shown as follows:
Make sure the electricity of BUNKER chassis is powered off. Before charging, please make sure Q2 (key switch) in the rear control console is turned off;
Insert the charger plug into Q3 charging interface on the rear control panel;
Connect the charger to power supply and turn on the switch in the charger. Then, the robot enters the charging state.
3.3 Communication using CAN
BUNKER provides CAN interfaces for customization and development. Users can send command to control the chassis through the CAN interface. BUNKER uses CAN2.0B communication standard with 500K baud rate and Motorola message format. The moving linear speed and the rotational angular speed of chassis can be controlled by CAN bus interface. The feedback of current motion status and chassis status would be provided from BUNKER simultaneously. The protocol includes system status feedback frame, motion control feedback frame and control frame, please refer to the content as below for detail:
The system status feedback command provides the feedback about current status of the chassis, control mode status, battery voltage and system failure. The information is given in Table 3.1.
The motion control feedback frame includes the feedback of linear and angular speed of chassis. Please refer to Table 3.3 for detail.
The motion control frame includes linear speed, angular speed and checksum. Please refer to Table 3.4 for detail.
The control mode setting frame is used to set the terminal interface. Please refer to Table 3.5 for detail.
Note[1] Description for control mode
When the remote control is power off, the control mode of BUNKER is can command control by default , that means chassis can be controlled by commands directly. Please note that the control mode in command still need to set 0x01 if the speed command need to be executed successfully. If you power on the remote control, then the remote control has the highest priority, the chassis would switch the control mode based on remote control only.
The status clear frame is used to clear the system failures, please refer to table 3.6 for detail.
Note[2]Testing data : The following data is used for testing only.
1.The chassis moves forward at 0.15m/s.
2.The chassis rotates at 0.2rad/s.
In addition to the feedback of chassis status, there are also feedback data from the motors and sensors.
3.3.2 CAN Cable Connection
An aviation male plugs are supplied along with BUNKER as shown in Figure 3.2.
The definition of the line is yellow for CANH, blue for CANL, red for positive power supply, and black for negative power supply. The external expansion interface of the current BUNKER version is only open to the top interface. In this version, the power supply can provide a maximum current of 10A.
3.3.3Implementation of CAN
Correctly start the chassis of BUNKER mobile robot, and turn on FS RC transmitter. Then, switch to the command control mode, i.e. toggling SWB mode of FS RC transmitter to the top. At this point, BUNKER chassis will accept the command from CAN interface, and the host can also parse the current state of chassis with the real-time data fed back from CAN bus. For the detailed content of protocol, please refer to CAN communication protocol.
3.4 Firmware upgrades
The RS232 port on BUNKER can be used by users to upgrade the firmware for the main controller in order to get bug fixes and feature enhancements. A PC client application with graphical user interface is provided to help make the upgrading process fast and smooth. A screenshot of this application is shown in Figure 3.3.
3.5 BUNKER ROS Package Use Example
ROS provide some standard operating system services, such as hardware abstraction, low-level device control, implementation of common function, interprocess message and data packet management. ROS is based on a graph architecture, so that process of different nodes can receive, and aggregate various information (such as sensing, control, status, planning, etc.) Currently ROS mainly support UBUNTU.
Preparation
Hardware preparation
CANlight can communication module ×1
Thinkpad E470 notebook ×1 A
GILEX BUNKER mobile robot chassis ×1
AGILEX BUNKER remote control FS-i6s ×1
AGILEX BUNKER top aviation power socket ×1
Use example environment description
Ubuntu 16.04 LTS (This is a test version, tasted on Ubuntu 18.04 LTS)
ROS Kinetic (Subsequent versions are also tested)
Git
Hardware connection and preparation
Lead out the CAN wire of the BUNKER top aviation plug or the tail plug, and connect CAN_H and CAN_L in the CAN wire to the CAN_TO_USB adapter respectively;
Turn on the knob switch on the BUNKER mobile robot chassis, and check whether the emergency stop switches on both sides are released;
Connect the CAN_TO_USB to the usb point of the notebook. The connection diagram is shown in Figure 3.4.
ROS installation and environment setting
For installation details, please refer to http://wiki.ros.org/KINETIC/INSTALLATION/UBUNTU
Test CANABLE hardware and CAN communication
Setting CAN-TO-USB adaptor
Enable gs_usb kernel module
$ sudo modprobe gs_usb
Setting 500k Baud rate and enable can-to-usb adaptor
$ sudo ip link set can0 up type can bitrate 500000
If no error occurred in the previous steps, you should be able to use the command to view the can device immediately
$ ifconfifig -a
Install and use can-utils to test hardware
$ sudo apt install can-utils
If the can-to-usb has been connected to the BUNKER robot this time, and the car has been turned on, use the following commands to monitor the data from the BUNKER chassis
$ candump can0
Please refer to:
[1]https://github.com/agilexrobotics/agx_sdk
[2]https://wiki.rdu.im/_pages/Notes/Embed%02ded-System/Linux/can-bus-in-linux.html
AGILEX BUNKER ROS PACKAGE download and compile
Download ros package
$ sudo apt install ros-$ROS_DISTRO-teleop-twist-keyboard
$ sudo apt install ros-$ROS_DISTRO-joint-state-publisher-gui
$ sudo apt install ros-$ROS_DISTRO-ros-controllers
$ sudo apt install ros-$ROS_DISTRO-webots-ros
$ sudo apt install libasio-dev
Clone compile bunker_ros code
$ cd ~/catkin_ws/src
$ git clone https://github.com/agilexrobotics/bunker_ros.git
$ git clone https://github.com/agilexrobotics/agx_sdk.git
$ cd ~/catkin_ws
$ catkin_make
Please refer to:https://github.com/agilexrobotics/bunker_ros
Start the ROS node
Start the based node
$ roslaunch bunker_bringup bunker_robot_base.launch
Start the keyboard remote operation node
$ roslaunch bunker_bringup bunker_teleop_keyboard.launch
Last updated