# 3 Getting Started

This section introduces the basic operation and development of the SCOUT 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 SCOUT 2.0. Check whether there are significant anomalies; if so, please contact the after-sale service personal for support;&#x20;

Check the state of emergency-stop switches. Make sure both emergency stop buttons are released;

#### Startup

Rotate the key switch (Q1 on the electrical panel), and normally, the voltmeter will display correct battery voltage and front and rear lights will be both switched on;&#x20;

Check the battery voltage. If there is no continuous "beep-beep-beep..." sound from beeper, it means the battery voltage is correct; if the battery power level is low, please charge the battery;

&#x20;Press Q3 (drive power switch button).

#### Shutdown

Rotate the key switch to cut off the power supply;

#### Emergency stop

Press down emergency push button both on the left and the right of SCOUT 2.0 vehicle body;

#### Basic operating procedure of remote control

After the chassis of SCOUT 2.0 mobile robot is started correctly, turn on the RC transmitter and select the remote-control mode. Then, SCOUT 2.0 platform movement can be controlled by the RC transmitter.

### 3.2 Charging

SCOUT 2.0 IS EQUIPPED WITH A 10A CHARGER BY DEFAULT TO MEET CUSTOMERS' RECHARGING DEMAND.

#### 3.2.1 Charging operation

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

&#x20;Insert the charger plug into Q6 charging interface on the rear control panel;&#x20;

Connect the charger to power supply and turn on the switch in the charger. Then, the robot enters the charging state.

&#x20;Note: For now, the battery needs about 3 to 5 hours to be fully recharged from 22V, and the voltage of a fully recharged battery is about 29.2V; the recharging duration is calculated as 30AH ÷ 10A = 3h.

#### 3.2.2 Battery replacement

SCOUT2.0 adopts a detachable battery solution for the convenience of users. In some special cases, the battery can be replaced directly. The operation steps and diagrams are as follows (before operation, ensure that SCOUT2.0 is power-off):

Open the upper panel of SCOUT2.0, and unplug the two XT60 power connectors on the main control board (the two connectors are equivalent) and the battery CAN connector;&#x20;

Hang SCOUT2.0 in midair, unscrew eight screws from the bottom with a national hex wrench, and then drag the battery out;&#x20;

Replace the battery and fixed the bottom screws.&#x20;

Plug the XT60 interface and the power CAN interface into the main control board, confirm that all the connecting lines are correct, and then power on to test.

![Figure 3.1 Schematic Diagram of replace battery](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FPhFzZR3FYKqq9qljzlux%2Fimage.png?alt=media\&token=758bcc80-c798-481a-94cd-723ef1924cf6)

### 3.3 Communication using CAN

SCOUT 2.0 provides CAN and RS232 interfaces for user customization. Users can select one of these interfaces to conduct command control over the vehicle body.

#### 3.3.1 CAN cable connection

SCOUT2.0 deliver with two aviation male plugs as shown in Figure 3.2. For wire definitions, please refer to Table 2.2.

#### 3.3.2 Implementation of CAN command control

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

![Figure 3.2 Schematic diagram of aviation plug male connector](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FgKaBRRhN2HdDfFM14q5d%2Fimage.png?alt=media\&token=05aea42d-6721-47c9-9dfd-edb9d5016119)

#### 3.3.3 CAN message protocol

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

![Table 3.1 Feedback Frame of SCOUT 2.0 Chassis System Status](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Fg5QzbUSRYUWJp5MhdWfd%2Fimage.png?alt=media\&token=b9d52713-a528-47cd-9e9d-d71a0f6ea866)

![Table 3.2 Description of Failure Information](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FDYboogB8EYCDTBsK2jyz%2Fimage.png?alt=media\&token=e3ad8303-f517-4d8a-9d0e-c079c2df67b8)

#### Note\[1]: Robot chassis firmware version V1.2.8 is supported by subsequent versions, and the previous version requires firmware upgrade to support Note\[2]: The buzzer will sound when the battery under-voltage, but the chassis control will not be affected, and the power output will be cut off after the under-voltage fault

The command of movement control feedback frame includes the feedback of current linear speed and angular speed of moving vehicle body. For the detailed content of protocol, please refer to Table 3.3.

![Table 3.3 Movement Control Feedback Frame](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FLUAt2UYrURQAikkDbZS1%2Fimage.png?alt=media\&token=56a48e05-da3a-47ef-89b1-fffd00e75395)

The control frame includes control openness of linear speed and control openness of angular speed. For its detailed content of protocol, please refer to Table 3.4.

![Table 3.4 Control Frame of movement Control Command](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FdAw4wA3FWQfBYlMf42no%2Fimage.png?alt=media\&token=b3471508-a6c0-4775-86f5-58f718a256c1)

The mode setting frame is used to set the control interface of the terminal. For its detailed content of protocol, please refer to Table 3.5.

![Table 3.5 Control mode setting frame](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2F3luzXPluKnaVKWKuQaeB%2Fimage.png?alt=media\&token=f1f1b7da-7062-430f-9a5b-826a7f408f32)

Description of control mode: In case the SCOUT 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. For its detailed content of protocol, please refer to Table 3.6.

![Table 3.6 Status Setting Frame](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FKHiQVY6ZriXyfC7PtVoc%2Fimage.png?alt=media\&token=2fc0412a-3558-4c88-9c60-4518e200ed2e)

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

1.The vehicle moves forward at 0.15m/s

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FpsdZbtfSzDRq5tRFPzP0%2Fimage.png?alt=media\&token=99368f36-2459-4804-a861-087681b8e214)

2.The vehicle steering 0.2rad/s

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2F5xLmzSNnryj4ZSfm1GmZ%2Fimage.png?alt=media\&token=b9da9ec2-0286-4ae7-abe1-7f996f111db7)

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 4 motors in the chassis are shown in the figure below:

![Figure 3.0 Schematic diagram Motor feedback ID](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FTE6Ae0WRu48ANVcaen58%2Fimage.png?alt=media\&token=1a0aa3d3-8122-47f8-ac56-2cc45b3bd9e9)

![Table 3.7 Motor Speed Current Position Information Feedback](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FhZlXU7uPBgrn7oR2RZJr%2Fimage.png?alt=media\&token=0907316c-89bd-44e2-acdc-e0db5a0c52c4)

![Table 3.8 Motor temperature, voltage and status information feedback](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2F88c1TzTvllnm3z8zEoep%2Fimage.png?alt=media\&token=db997e89-c0d6-47c5-8b07-6e84f547e24d)

![Table 3.9 Drive Status](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Fj8FfDQKxcF1DTBret6Lg%2Fimage.png?alt=media\&token=38aceb7a-a2fb-4499-a509-7caff3298500)

The front and external lights also support command control. The following table shows the control commands:

![Table 3.10 Light Control Frame](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FNNH2b4GLAaPdM1EvuqTc%2Fimage.png?alt=media\&token=3f20cd66-8fb5-4b93-a947-7f64bbc268ea)

#### Note \[5]: The values are valid for custom mode.

![Table 3.11 Light Control Feedback Frame](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FYY49Uj9Ebkfejr0q7XP1%2Fimage.png?alt=media\&token=f4e406f4-254b-43b2-b60c-4c98ae308ca3)

![Table 3.12 System Version Information Enquiry Frame](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FSreLEaRT3hFMgquqdDoW%2Fimage.png?alt=media\&token=6d238c7f-ae1d-485d-906d-abb7d4448cc3)

![Table 3.13 System Version Information Enquiry Frame](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2F9gzY7Sh1wj2pNQCzpnQW%2Fimage.png?alt=media\&token=c5c06e6b-5021-4254-9834-dbcb99007d82)

![Table 3.14 Mileometer Information Feedback](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2F2Snep1jRDUfM4y2bJ8mp%2Fimage.png?alt=media\&token=1ec3f093-aeef-48a9-8e29-12da5c77bca2)

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FuB6zOZ0RhYSQ08oijjDH%2Fimage.png?alt=media\&token=4b0307ac-7cc8-4fe0-aee4-fdfca3ebb653)

![Table 3.15 Remote Control Information Feedback](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2F2UkgscFxKkhs78ni7bL7%2Fimage.png?alt=media\&token=8618cfcc-0862-492e-bed5-3380271e3416)

### 3.4 Serial Communication Protocol

#### 3.4.1 Instruction of serial protocol

It is a standard for serial communication jointly formulated by the Electronic Industries Association (EIA) of the United States in 1970 conjunction with Bell Systems, modem manufacturers and computer terminal manufacturers. Its name is "Technical Standard for Serial Binary Data Exchange Interface Between Data Terminal Equipment (DTE) and Data Communication Equipment (DCE)". The standard stipulates that a 25-pin DB-25 connector is used for each connector. The signal content of each pin is specified, and the levels of various signals are also specified. Later, IBM's PC simplified RS232 into a DB-9 connector, which became the practical standard. The RS-232 port of industrial control generally only uses three lines of RXD, TXD, and GN&#x44;**.**

#### 3.4.2 Serial Connection

Use the USB to RS232 serial cable in our communication tool to connect to the serial port at the rear of the car, use the serial tool to set the corresponding baud rate, and use the sample data provided above to test. If the remote control is turned on, it is necessary to switch the remote control to command control mode. If the remote control is not turned on, just send the control command directly. It should be noted that the command must be sent periodically. If the chassis exceeds 500MS and the serial port command is not received, it will enter the loss of connection protection. statu&#x73;**.**

#### 3.4.3 Serial Protocol Content

#### Basic Communication Parameter

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FqC3yiqiq8vf1Sk4TIFvK%2Fimage.png?alt=media\&token=3ebf5c95-bc03-4eda-911a-d0af6dcb3238)

#### Instruction of protocol

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FFLC6Uuy9HtImbeElUxbz%2Fimage.png?alt=media\&token=960b4591-6e9a-4fb4-a07e-327a07ad2913)

The protocol includes the start bit, frame length, frame command type, command ID, data range, frame ID, and checksum. The frame length refers to the length excluding the start bit and the checksum. The checksum is the sum of all data from the start bit to the frame ID; the frame ID bit is from 0 to 255 counting loops, which will be added once every command sent.

/\*\*

\*@brief serial message checksum example code&#x20;

\*@param\[in] \*data : serial message data struct pointer&#x20;

\*@param\[in] len :serial message data length

\*@return the checksum result

\*/

static uint8 Agilex\_SerialMsgChecksum(uint8 \*data, uint8 len)

{

uint8 checksum = 0x00;

for(uint8 i = 0 ; i < (len-1); i++)

{

checksum += data\[i];

}

return checksum;

}

#### Protocol Content

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Flah7ppbct8TK1zQgVKcZ%2Fimage.png?alt=media\&token=89e3a9a8-9c1b-441b-b35e-d47c04765e8f)

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FyQ0z600r2xySqKanxnA8%2Fimage.png?alt=media\&token=b7369866-d837-4b44-bd65-8f8224216157)

#### Note\[1]: Robot chassis firmware version V1.2.8 is supported by subsequent versions, and the previous version requires firmware upgrade to support.

#### Movement Control Feedback Command

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FU1oebKN3J9RrOHL8ixx9%2Fimage.png?alt=media\&token=e58d3f2a-7b48-45f0-ac31-511e452d50d2)

#### Movement Control Command

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FVcLVkgN0ogwZZJ1MS2QK%2Fimage.png?alt=media\&token=b825e820-3ef7-4f0d-a54b-e19a850b5f84)

#### Control Mode Setting Command

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FacPRvKvBdoaFJ1tNSH8i%2Fimage.png?alt=media\&token=fe86045c-ec3a-4c36-80ca-85e51dba4fd3)

#### Status Setting Command

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FLoZ4uXGJwBIpKXylqqkf%2Fimage.png?alt=media\&token=640f0762-00cb-42ce-98a1-a3f9a8bf55f9)

#### Motor Drive High Speed Information Feedback Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Fhc3UFoTAhN7kYmoeDj26%2Fimage.png?alt=media\&token=975e7c6b-0d97-4a39-964d-1fcf562976a5)

#### Motor Drive Low Speed Information Feedback Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FWJV16fynUdobzhcpI6Wl%2Fimage.png?alt=media\&token=ee2cb125-dfbc-4afe-b49d-b4e9a456808d)

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Fdlt581ggwuPGGlDXDSpk%2Fimage.png?alt=media\&token=fc03448d-fb71-479b-9a44-5e36e2c8649b)

#### Light Control Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FmHp1Nc13YAAw6znDVDBd%2Fimage.png?alt=media\&token=48847e7b-9a02-459f-abe3-d3a63b0a91a3)

#### Light Control Feedback Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FkZMdqJDX70j12GWC240s%2Fimage.png?alt=media\&token=905d3f81-fa7f-4f20-9a44-adb7405425f8)

#### Mileage Feedback Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FJ5xhRLzF1lcZ3tH0wdet%2Fimage.png?alt=media\&token=9f1292e3-f24d-4b3a-adb1-0432b3244aa5)

#### Version Information Enquiry Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FN1rLd2fgsAVVEZDCHpZn%2Fimage.png?alt=media\&token=63936bf5-8181-4c27-add2-97b69addf407)

#### Version Information Feedback Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FDZ4gk9BtkpYo8Lw04R2A%2Fimage.png?alt=media\&token=862b1c8b-0b3c-4703-bff9-95bfcbc7ee6a)

#### Remote Control Information Feedback Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FuQxVNc9vQMnbsrcnEBLU%2Fimage.png?alt=media\&token=3bde0f71-d1ce-4ce6-800f-a3635ee86406)

#### BMS Feedback Frame

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Fk1aYuCAnZHQ0g1zc9i23%2Fimage.png?alt=media\&token=d9646237-87be-4af4-945a-32dc8f01b4ff)

#### Example Data

By controlling the chassis to move forward at a linear speed of 0.15m/s, the following is the specific data content.

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2F84zsXOt36YAW1RZQsDfq%2Fimage.png?alt=media\&token=cd3a92d6-8ec4-44ef-b20c-4410e69423ac)

The following is the content of the data range:

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Fr693mFUCP7S38Yh58uYN%2Fimage.png?alt=media\&token=11d7a92b-e8ba-4214-9ee6-61bce77c00aa)

The entire data content is: 5A A5 0A 55 01 00 96 00 00 00 00 00 F5 Other note: This protocol requires firmware version more than V1.5.12

### 3.5 Firmware upgrades

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

![](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2FSH8VRAKvRcQHFHvUiXDG%2Fimage.png?alt=media\&token=194a8f0f-4783-474a-8eec-eba0f9a7abd2)

#### Upgrade preparation

SERIAL CABLE × 1&#x20;

USB-TO-SERIAL PORT × 1&#x20;

SCOUT 2.0 CHASSIS × 1&#x20;

COMPUTER (WINDOWS OPERATING SYSTEM) × 1

#### Firmware upgrade software

{% embed url="<https://github.com/agilexrobotics/agilex_firmware>" %}

#### Upgrade procedure

Before connection, ensure the robot chassis is powered off;&#x20;

Connect the serial cable onto the serial port at rear end of SCOUT 2.0 chassis;&#x20;

Connect the serial cable to the computer;&#x20;

Open the client software;&#x20;

Select the port number;&#x20;

Power on SCOUT 2.0 chassis, and immediately click to start connection (SCOUT 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;&#x20;

Load Bin file;&#x20;

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

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

### 3.6 SCOUT 2.0 SDK

In order to help users implement robot-related development more conveniently, a cross-platform supported SDK is developed for SCOUT 2.0 mobile robot.SDK software package provides a C++ based interface, which is used to communicate with the chassis of SCOUT 2.0 mobile robot and can obtain the latest status of the robot and control basic actions of the robot. For now, CAN adaptation to communication is available, but RS232-based adaptation is still under way.Based on this, related tests have been completed in NVIDIA JETSON TX2.

### 3.7 SCOUT2.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&#x20;

Thinkpad E470 notebook ×1&#x20;

AGILEX SCOUT 2.0 mobile robot chassis ×1&#x20;

AGILEX SCOUT 2.0 remote control FS-i6s ×1&#x20;

AGILEX SCOUT 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)&#x20;

#### ROS Kinetic (Subsequent versions are also tested)&#x20;

Git

#### Hardware connection and preparation

Lead out the CAN wire of the SCOUT 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;&#x20;

Turn on the knob switch on the SCOUT 2.0 mobile robot chassis, and check whether the emergency stop switches on both sides are released；&#x20;

Connect the CAN\_TO\_USB to the usb point of the notebook. The connection diagram is shown in Figure 3.4.

![Figure 3.4 CAN connection diagram](https://393225688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIelc0aeaqw5GnW7U2J2%2Fuploads%2Fgwx7JJ6J8Et9NWKh7lI0%2Fimage.png?alt=media\&token=9dcb1b0a-a429-4f0c-8f2d-7eee99581388)

#### ROS installation and environment setting

For installation details, please refer to <http://wiki.ros.org/kinetic/Installa%02tion/Ubuntu>

#### Test CANABLE hardware and CAN communication

Setting CAN-TO-USB adaptor

Enable gs\_usb kernel module&#x20;

$ sudo modprobe gs\_usb&#x20;

Setting 500k Baud rate and enable can-to-usb adaptor&#x20;

$ sudo ip link set can0 up type can bitrate 500000&#x20;

If no error occurred in the previous steps, you should be able to use the command to view the can device immediately&#x20;

$ ifconfifig -a&#x20;

Install and use can-utils to test hardware&#x20;

$ sudo apt install can-utils&#x20;

If the can-to-usb has been connected to the SCOUT 2.0 robot this time, and the car has been turned on, use the following commands to monitor the data from the SCOUT 2.0 chassis&#x20;

$ candump can0&#x20;

Please refer to:&#x20;

\[1]<https://github.com/agilexrobotics/agx\\_sdk&#x20>;

\[2]<https://wiki.rdu.im/\\_pages/Notes/Embedded-System/-> Linux/can-bus-in-linux.html

#### AGILEX SCOUT 2.0 ROS PACKAGE download and compile

Download ros package&#x20;

$ sudo apt install ros-$ROS\_DISTRO-controller-manager&#x20;

$ sudo apt install ros-$ROS\_DISTRO-teleop-twist-keyboard&#x20;

$ sudo apt install ros-$ROS\_DISTRO-joint-state-publisher-gui $ sudo apt install libasio-dev&#x20;

Clone compile scout\_ros code&#x20;

$ cd \~/catkin\_ws/src&#x20;

$ git clone <https://github.com/agilexrobotics/scout\\_ros.git&#x20>;

$ git clone <https://github.com/agilexrobotics/agx\\_sdk.git&#x20>;

$ cd scout\_ros && git checkout scout\_v2&#x20;

$ cd ../agx\_sdk && git checkout scout\_v2&#x20;

$ cd \~/catkin\_ws&#x20;

$ catkin\_make&#x20;

Please refer to：<https://github.com/agilexrobotics/scout\\_ros>

#### Start the ROS node

Start the based node&#x20;

$ roslaunch scout\_bringup scout\_minimal.launch&#x20;

Start the keyboard remote operation node&#x20;

$ roslaunch scout\_bringup scout\_teleop\_keyboard.launch&#x20;

Start gazebo simulate node&#x20;

$ roslaunch scout\_bringup scout\_base\_gazebosim.launch
