-
Notifications
You must be signed in to change notification settings - Fork 0
3. Real Robot Instruction
Important
Warning: When the robot is first powered on, it starts in demo mode and can be manually controlled using the RC. However, without a WiFi connection, critical features like mission planning, SSH, RViz visualization, and development mode are unavailable. To unlock full functionality, including remote access, the initial WiFi setup must be completed.
Follow the steps below to connect the robot to your desired Wifi network
Initiate a hotspot from your smartphone/laptop with the credentials
- Hotspot Name:
admin
- Hotspot Password:
adminadmin
Power on the robot and wait until it connects to your hotspot network
On powering on: | When connected to hotspot: |
---|---|
- Connect your laptop/remote device to the same hotspot
- Open a new terminal, and enter the SSH credentials
# Method 1-ssh using user name
ssh [email protected]
pwd: "rbl@2020"
#Method 2 -ssh using ip address
ssh [email protected]
pwd: "rbl@2020"
Tip
IP can be seen on the display of robot once connected with WiFi
Method1 | Method2 |
---|---|
- Enter the following command on the ssh terminal to check available networks
sudo nmcli dev wifi list --rescan yes
- Connect to your wifi network
sudo nmcli device wifi connect "your-wifi-name" password "your-wifi-password"
Important
This will close the ssh pipeline and no response will be recieved over it further. Wait for about 30 seconds for robot to be connected to your wifi, once connected it will show the wifi name along with the IP address on the robot display.
- Now the robot is connected to your Wifi network! You can now shutdown your mobile hotspot, connect your remove device to the same wifi and access the robot using SSH:
There are two modes of robot
Note
By default, the robot is configured to start automatically in Demo Mode, running ROS without requiring a Wi-Fi network. To start the robot in Demo Mode (i.e., to automatically launch the desired ROS processes on boot), use the following command:
# For going into demo mode
cd ros2_ws/src/diadem
./demo.sh
Note
To switch to Development Mode, which will prevent any ROS processes from starting automatically, allowing you to test your launch files, SSH into the robot and execute the necessary commands to disable automatic startup.
# For going into Development mode
cd ros2_ws/src/diadem
./development.sh
To launch only sensors and actuators without navigation and odometry:
ros2 launch diadem_firmware bringup.launch.py
By default realsense launch is set to False, launch the script with realsense:=True Argument to get the realsense up.
RC Control is operated by default on bootup. Turn on the Radiolink controller and set its mode to RC mode to start controlling the robot using RC.
Criteria | Direct Control | Quick Adaptive Control | Smooth Adaptive Control |
---|---|---|---|
RC and CMD Control | ☑ | ☑ | ☑ |
Fast Reaction Time | Fastest | Moderate | Slowest |
Closed Loop System | False | True | True |
Inertial Jerks | Too Jerky | Moderate Jerk | Least Jerky |
Control Method | Description | WiFi Requirement | Compatibility with PID Modes |
---|---|---|---|
RF Control | Works directly with Radiolink RC controller without the need for any WiFi network. | Not Required | Direct Control Quick Adaptive Control Smooth Adaptive Control |
ROS-based Teleop Control | Subscribes to cmd_vel topic to actuate the vehicle. Requires WiFi network to work. |
Required | Direct Control Quick Adaptive Control Smooth Adaptive Control |
Pixhawk-based Control | Uses Pixhawk to gain missions and converts the data to cmd_vel , which is accessible to ROS. |
Required | Direct Control Quick Adaptive Control |
[!WARNUNG]🚫This mode is not recommended as the PID values are tuned by us. If you choose to use custom values, ensure that the robot is kept above ground.🚫
To add custom PID values and save them, use the following commands:
-
Add Custom PID Values:
ros2 topic pub -1 /pid/constants std_msgs/msg/Float32MultiArray "{data: [1.1, 2.2, 3.3]}"
-
Save the Custom PID Values:
ros2 topic pub -1 /pid/custom/save std_msgs/msg/Float32MultiArray "{data: [1.1, 2.2, 3.3]}"
The custom PID setup button is disabled by default and can only be accessed upon enabling it purposefully.
ros2 topic pub -1 /pid/custom/enable std_msgs/Bool "data: true"
When enabled, you can press the button shown above to switch to your custom PID mode with your custom PID values.
ROS communication works on the WiFi Network. Make sure to arrange the WiFi network before starting the robot. Once connected to the network, SSH into the PC and launch:
ros2 launch diadem_firmware bringup.launch
IMPORTANT: This launch file is initiated by default on bootup of the robot. If the startup service is kept activated, you do not need to manually launch the files.
Now you can access the topics on the robot. Teleoperate the robot using teleop_twist_keyboard
:
ros2 run teleop_twist_keyboard teleop_twist_keyboard
We be using Mavros package for interfacing with Pixhawk. Following are the steps to setup MAVROS and QGC (Q Ground Control which is mission planning application for any MAVLink enabled AGV)
Check your robot's connection via Pixhawk. It should be connected as shown below in USB Ports Configuration.
Method 1: Using QGroundControl
Important
The robot can be controlled directly via QGroundControl. Follow the steps below to connect the robot via QGC:
1. Install QGroundControl
Download the app from here (Compatible with Windows, macOS, Ubuntu, and Android)
Important
Enter the IP address of the robot. How to obtain IP?
Important
There are chances when it is unable to establish a connection the very first time. In that scenario, delete the connection and follow the steps again.
Once connected, you will be able to see the robot's status and coordinates on the QGC page. Now you can control the vehicle and send missions through QGC.
Method 2: Using ROS Scripts
We have provided the API Script along with the package to enable the GPS navigation using ROS scripts
Navigate to diadem_firmware/scripts/waypoint_navigation.py to get access to the API
Important
To enable Obstacle avoidance in GPS navigation using Realsense d435i, follow the instructions provided here
IMPORTANT: Connect the USB ports as per the following diagram:
To find the IP address of the robot, run the following command on the robot's PC:
hostname -I
This will display the IP address of the robot. Use this IP address to SSH into the robot or connect it to your ROS network.
ROS domain id for robot is set to 169. So to visualize robot ros topics in remote PC we need to enter below command in terminal of remote pc everytime we open a new terminal.
export ROS_DOMAIN_ID=169