Operate MR-Buggy 3 using NavQPlus and FMURT6

07/2023

Introduction

This tutorial describes how to operate MR-Buggy 3 with Logitech Joystick using NavQPlus and FMURT6.

The synapse packages from CogniPilot are built on NavQPlus which will read input from the Joystick and send the appropriate commands to FMURT6 over ethernet.

The mrbuggy application in CogniPilot/cerebri running on FMURT6 takes commands from NavQPlus and sends operation signals to MR-Buggy 3 servo and motor controller.

Items Needed

Hardware Procedure

Block Diagram of the Complete Hardware Setup
RDDRONE-FMURT6
NavQPlus
USB-UART Serial Debugger
Pixhawk Debug Adaptor and J-Link EDU Mini

Power Supply Setup

  1. Press "Power" Button.

  2. Press "Output On/Off" Button.

  3. Select "Voltage" from "Voltage/Current" Button.

  4. Set the Voltage to 7.4 V from the "Tuning Nob."

  5. Connect the output wires to XT60 M1 on buggy.

E3648A 100W Dual Output Power Supply

FMURT6 Software Procedure (on host machine)

Prerequisites

  1. Unrestricted network connection

  2. Ubuntu 22.04 on native machine

  3. Setup ssh keys

sudo apt update
sudo apt upgrade

sudo apt install git

Software Setup

mkdir -p ~/git/cognipilot/
cd ~/git/cognipilot/
git clone git@github.com:CogniPilot/helmet.git
cd helmet
./scripts/install.sh -f dream/mrbuggy3.yaml

Type "y" + "enter" when required.

source ~/.bashrc
source ~/.profile

Building and Flashing

cd ~/git/cognipilot/ws/cerebri/app/mrbuggy3
west build -b mimxrt1062_fmurt6 -p

Download and install Jlink from: https://www.segger.com/downloads/jlink/

west flash

Prerequisites

  1. Unrestricted network connection

  2. Setup ssh keys

NavQ+ requires internet connection for the following setup. If an ethernet connection is not available, connect the board to the native ubuntu machine via ethernet and create a network bridge from wifi to ethernet on your machine.

Accessing Shell

minicom -D /dev/<device_name> -b 115200

username=user

password=user

Software Setup

sudo apt update
sudo apt upgrade
sudo apt install ros-humble-actuator-msgs

mkdir -p ~/git/cognipilot/src
cd ~/git/cognipilot/src
git clone git@github.com:CogniPilot/synapse_ros.git
git clone git@github.com:CogniPilot/synapse_msgs.git
git clone git@github.com:CogniPilot/synapse_protobuf.git
git clone git@github.com:CogniPilot/synapse_tinyframe.git

cd ~/git/cognipilot
colcon build --symlink-install

Network Setup

sudo vi ~/.net.sh

``` (Add the following lines in ~/.net.sh)
#!/bin/bash
sudo ethtool -s eth0 master-slave forced-slave
sudo ifconfig eth0 192.0.2.2 netmask 255.255.255.0
```
echo "bash /home/$USER/.net.sh" >> ~/.bashrc
source ~/.bashrc

Running and Demonstration

Execution on NavQPlus

Since, ros2 commands block the shell, we will need two shells for the following.

ros2 run joy joy_node --ros-args -r /joy:=/cerebri/in/joy

cd ~/git/cognipilot/install
source setup.bash
ros2 launch synapse_ros synapse_ros.launch.py

Operation from Joystick

Logitech Joystick G F310 Button Mapping
  1. Set the Joystick to X-Input Mode (from the switch behind the controller).

  2. Press the mode button such that the green light next to it is turned on.

  3. Press green button A (0) to select manual mode.

  4. Press start button (7) to arm in the selected mode.

  5. Use vertical d-pad axis (1) for acceleration/reverse.

  6. Use horizontal right-stick axis (3) for steering.

  7. All controls: joy axes 1 is throttle, joy axes 3 is yaw/steering, button 7 is arm, button 6 is disarm, button 1 is mode manual, button 1 is mode auto, button 2 is mode cmd_vel.

Last updated

Was this helpful?