3 Getting Started

This section introduces the basic operation and development of the HUNTER 2.0 platform using the CAN bus interface.

3.1 Use and operation

The basic operating procedure of startup is shown as follows:

Check

Check the condition of HUNTER 2.0. Check whether there are significant anomalies; if so, please contact the after-sale service personal for support;

Check the state of emergency-stop switches. Make sure both emergency stop buttons are 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 Q3 button, and normally, the voltmeter will display correct battery voltage and front and rear lights will be both switched on;

Check the battery voltage, the normally voltage range is 24~26.8V, if there is continuous “beep-beep-beep...” sound from beeper,it means the battery voltage is low, please charge the battery.

Shutdown

Press the button Q3 to cut off the power supply.

Emergency stop

Press down emergency push button on the top of HUNTER 2.0 chassis body.

Basic operating procedure of remote control

After the chassis of HUNTER 2.0 mobile robot is started correctly, turn on the RC transmitter and push the SWB to the remote control mode, then, HUNTER 2.0 platform movement can be controlled by the RC transmitter.

Parking

The parking brake adopts a power off electromagnetic band type brake to realize the parking function, so when the chassis is running, the parking function must be turned off before moving;

In the remote control mode, SWA is the parking function switch. You can control movement after turning the stick to the top to turn off the parking function. Turn the stick to the bottom to turn on the parking mode, if the chassis speed is not 0 at this time, it will automatically decelerate to 0 and turn on the parking function.

In the command mode, the parking mode is the default when the power is turned on. At this time, there is no response to the speed command, and the parking release command needs to be sent before the speed command can be sent for control. If you need to park after the motion control is completed, just send a parking command.

When the emergency stop is triggered, the parking will automatically start. At this time, released the emergency stop, no matter where the remote control SWA is located, it needs to be unlocked again for normal movement. If the power fails to be re-powered after a power failure (such as low battery voltage), you can use the Q2 knob switch to manually unlock the parking to facilitate moving the chassis or trailer. It should be noted that the manual (tail knob switch Q2) unlocking the parking has the highest priority, which will invalidate the parking in the program, so it is limited to special circumstances. Please close it in time after use.

Ramp parking, when HUNTER 2.0 is on the slope, if the speed is 0, HUNTER 2.0 will check the current automatically. When it reaches a certain value and continues for a period of time, HUNTER 2.0 will turn on the ramp parking function automatically. After receiving the motion command again, the ramp parking will relieve automatically and start to running.

3.2 Charging and battery replacement

HUNTER 2.0 is equipped with a 10A charger by default to meet customers’ recharging demand.

The detailed operating procedure of charging is shown as follows:

Make sure the electricity of HUNTER 2.0 chassis is powered off. Before charging, please make sure the power switch in the rear control console is turned off;

Insert the charger plug into Q6 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.

Note: For now, the battery needs about 4 hours to be fully recharged from 21V, and the voltage of fully-recharged battery is about 26.8V.

Battery replacement

Turn off the power switch of the HUNTER 2.0 chassis.

Press the button lock on the battery replacement panel and open the battery panel.

Unplug the currently connected battery interface, respectively (XT60 power connector) (BMS connector) lock.

Take out the battery, pay attention to this process, the battery is forbidden to hit and collide.

Install the battery that will be used, and then plug the connector back.

Turn off the power to replace panel, press the lock.

3.3 Battery replacement

HUNTER 2.0 provides CAN and RS232 (not open to current version) interfaces for user customization. Users can select one of these interfaces to conduct command control over the chassis body.

3.3.1 CAN message protocol

HUNTER 2.0 adopts CAN2.0B communication standard which has a communication baud rate of 500K and Motorola message format. Though external CAN bus interface, the moving linear speed and the rotational angle of chassis can be controlled; HUNTER 2.0 will feedback on the current movement status information and its chassis status information in real time. The system status feedback command includes the feedback information about current status of chassis body, control mode status, battery voltage and system failure. The description is given in Table 3.1.

The command of movement control feedback frame includes the feedback of current linear speed and turning angle of chassis body. For the detailed content of protocol, please refer to Table 3.2.

The control frame includes linear speed control command, front wheel internal steering angle control command. For its detailed content of protocol, please refer to Table 3.3.

The mode setting frame is use to set the control interface of HUNTER 2.0. The detailed content of the protocol is as follows.

Description of control mode: In case the HUNTER 2.0 is powered on and the RC transmitter is not connected, the control mode is defaulted to standby mode. At this time, the chassis only receives control mode command, and does not respond other commands. To use CAN for control need to switch CAN command mode at first. If the RC transmitter is turned on, the RC transmitter has the highest authority, can shield the control of command and switch the control mode.

Status setting frame is use to clear the system errors. The detailed content of the protocol is as follows.

[Note] Example data: The following data is only used for testing

1.The chassis moves forward at 0.15m/s ( It need to unlock parking by command before running)

2.The chassis steering 0.2rad

The chassis status information will be feedback, and what’s more, the information about motor current, encoder and temperature are also included. The following feedback frame contains the information about motor current, encoder and motor temperature. The motor numbers of the four motors in the chassis correspond to: steering No. 1, right rear wheel No. 2, and left rear wheel No. 3

Motor speed current position information feedback

Parking control command is use to control the motor brake of the driving wheel. The detailed content of the protocol is as follows.

3.3.2 CAN cable connection

2 aviation male plugs are supplied along with HUNTER 2.0 as shown in Figure 3.2. Users need to lead wires out by welding on their own. For wire definitions, please refer to Table 3.2.

3.3.3 Implementation of CAN command control

Correctly start the chassis of HUNTER 2.0 mobile robot, and turn on RC transmitter. Then, switch to the command control mode, i.e. toggling S1 mode of RC transmitter to the top. At this point, HUNTER 2.0 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

In order to facilitate users to upgrade the firmware version used by HUNTER 2.0 and bring customers a more complete experience, HUNTER 2.0 provides a firmware upgrade hardware interface and corresponding client software. A screenshot of this application is shown in Figure 3.3

Upgrade preparation

Serial cable × 1

USB-to-serial port × 1

HUNTER 2.0 chassis × 1

Computer (Windows operating system) × 1

Upgrade procedure

Before connection, ensure the robot chassis is powered off;

Connect the serial cable onto the serial port at rear end of HUNTER 2.0 chassis;

Connect the serial cable to the computer;

Open the client software;

Select the port number;

Power on HUNTER 2.0 chassis, and immediately click to start connection (HUNTER 2.0 chassis will wait for 3s before power-on; if the waiting time is more than 3s, it will enter the application); if the connection succeeds, "connected successfully" will be prompted in the text box;

Load Bin file;

Click the Upgrade button, and wait for the prompt of upgrade completion;

Disconnect the serial cable, power off the chassis, and turn the power off and on again.

3.5 HUNTER 2.0 ROS Package

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.

Development Preparation

Hardware preparation

CANlight can communication module ×1

Thinkpad E470 notebook ×1

AGILEX HUNTER 2.0 mobile robot chassis ×1

AGILEX HUNTER 2.0 remote control FS-i6s ×1

AGILEX HUNTER 2.0 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 HUNTER 2.0 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 HUNTER 2.0 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

$ ifconfig-a

Install and use can-utils to test hardware

$ sudo apt install can-utils

If the can-to-usb has been connected to the HUNTER 2.0 robot this time, and the car has been turned on, use the following commands to monitor the data from the HUNTER 2.0 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 HUNTER 2.0 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 hunter_2_ros code

$ cd ~/catkin_ws/src

$ git clone https://github.com/agilexrobotics/hunter_2_ros.git

$ git clone https://github.com/agilexrobotics/agx_sdk.git

$ cd ~/catkin_ws

$ catkin_make

Please refer to: https://github.com/agilexrobotics/hunter_ros

Start the ROS node

Start the based node

$ roslaunch bunker_bringup hunter_2_robot_base.launch

Start the keyboard remote operation node

$ roslaunch bunker_bringup hunter_2_teleop_keyboard.launch

Last updated