myAGV PS4 controller

1 Connect the handle

1.1 Establish a data connection channel for the serial port and Bluetooth protocol layer

Open a console terminal (shortcut Ctrl+Alt+T) and enter the following instructions at the terminal:

sudo hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -

Mark of Success:

Device setup complete

If timeout runs again until Device setup complete appears.

1.2 Register for Bluetooth control

Enter the following command in the terminal to register Bluetooth control and enter the Bluetooth control command line:

sudo bluetoothctl

1.3 power on

Enter the following command at the terminal:

power on

Mark of Success:

Agent registered

1.4 discoverable on

Enter the following command at the terminal:

discoverable on

Mark of Success:

Changing discoverable on succeeded

1.5 scan on

Enter the following command at the terminal:

scan on

Mark of Success:

Discovery started

1.6 The pairing is made

  • First press ps and share for five seconds and pair when the indicator flashes quickly

手柄图片

  • Finds the Bluetooth logo in the top right corner of the interface and clicks on the Bluetooth-> Devices, to see the address of the remote handle, like my one here is 8C:41:F2:A1:2D:6A 蓝牙1 蓝牙2

  • pairs our handle device and enters in the terminal (the ADDR here is the address we just read now, and the device address you read when actually connected):

pair  8C:41:F2:A1:2D:6A  //The ADDR here is the address we read just now and enter the device address you read when actually connected.
  • Connects our handle device, enter in the terminal (ADDR here is the address we just read, enter the device address you read when actually connected):
connect 8C:41:F2:A1:2D:6A  //The ADDR here is the address we read just now, and enter the device address you read when actually connected.
  • You can see that the device connection is successful and the handle indicator is always blue Mark of Success:

Connected:yes

蓝牙连接成功

2 Open the launch file of myAGV

Open a new console terminal and enter on the command line:

roslaunch navigation_demo myagv_navigation.launch

Mark of Success:

First imu received.

开启小车launch终端

3 Open the handle control launch file

Open a new console terminal and enter on the command line:

roslaunch ds4_driver ds4_twist.launch

Mark of Success:Connected to Bluetooth Controller +[ADDR]

开启蓝牙launch终端

If you successfully get here, you can successfully use the handle to control the walking of myAGV. Because the handle has no speed regulation function, the speed will be faster, so you should drive carefully.

results matching ""

    No results matching ""