Welcome to the official public repository for Diadem by RigBetel Labs.
Purpose:
This repository hosts essential documentation and code for Diadem Robot, facilitating transparency and collaboration.
Privacy:
Certain sensitive packages and scripts have been excluded to maintain privacy standards.
Contents:
- Documentation: Detailed guides and technical specifications.
- Codebase: Essential source code for Diadem Robot.
- Resources: Supplementary materials and dependencies.
Contact:
For inquiries and collaboration opportunities, reach out to RigBetel Labs.
- 1. Package Description
- 2. Simulation
- 3. Real Robot Instructions
- 5. Features via ROS Topics
- 6. Diadem Robot Parameters
- 7. Diagnostic Tests
- 8. Charging Instructions
- 9. Removing the top lid of the robot
- 10. LED Indicators Instructions
Holds the robot description including URDF, STL, config files for RVIZ, and Gazebo.
File | Description | Nodes Launched |
---|---|---|
display.launch.py | Launches Gazebo simulation with all necessary plugins and state publishers, along with RViz. | robot_state_publisher, joint_state_publisher, rviz2, gazebo_ros |
rviz.launch.py | Launches RViz2 with necessary configuration. | rviz2 with configured settings |
state_publisher.launch.py | Launches state publishers for the robot, including robot_state_publisher and joint_state_publisher nodes. | robot_state_publisher, joint_state_publisher |
Provides sensor and actuation topics.
File | Description | Nodes Launched |
---|---|---|
bringup.launch.py | Launches the joy node and auto joy node for complete joystick and waypoint-based control of the robot using a joystick. | joy_node, auto_joy_teleop |
hubble_scripts.launch.py | Provides feedback to the controller about network data and navigation data, including network_pub node and goal_status_publisher node. | network_publisher (freezed binaries), goal_status_publisher (freezed binaries) |
mavros_launch.py | Launches Mavros Node | Mavros |
micro_ros.launch.py | Launches MicroROS | Micro ROS |
Simulation environment for tortoisebotpromax in Gazebo.
File | Description | Nodes Launched |
---|---|---|
gazebo.launch.py | Launches a Gazebo environment with a specified world, along with the gazebo_ros node. | gazebo_ros node |
spawn_robot.launch.py | Launches a Gazebo environment with a specified world and spawns the robot with necessary plugins using gazebo_ros node. | gazebo_ros node, robot_state_publisher, joint_state_publisher, gazebo_controllers |
For simulation, below process needs to be done in laptop/PC with ROS2 humble installed in it.
Clone the diadem repository into your workspace:
cd ~/ros2_ws/src # Assuming ros2_ws is the name of the workspace
git clone -b humble-pixhawk-release https://github.com/rigbetellabs/diadem.git
Install dependent packages:
cd ~/ros2_ws/src/diadem
cat requirements.txt | xargs sudo apt-get install -y
Build the workspace:
cd ~/ros2_ws
colcon build
To Launch simulation:
ros2 launch diadem_gazebo spawn_robot.launch.py
The gazebo world looks like this:
Now you can teleop the robot by publishing the msgs on /cmd_vel topic
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
The list of topics is crucial for low-level control and diagnostic purposes. Here is a comprehensive list:
- Type:
std_msgs/Bool
- Description: Enables or disables individual motor control. Ensure this is set to
true
to control the motors individually.
Warning
Enabling this mode will allow you to control the motors of the robot individually. Make sure you have lifted the robot to a higher level before using this feature to prevent an accidents
- Type:
std_msgs/Int32
- Description: Controls the right front motor of the robot. Make sure
/motor_control/enable
is set totrue
for this to take effect.
- Type:
std_msgs/Int32
- Description: Controls the left front motor of the robot. Make sure
/motor_control/enable
is set totrue
for this to take effect.
- Type:
std_msgs/Int32
- Description: Controls the right back motor of the robot. Make sure
/motor_control/enable
is set totrue
for this to take effect.
- Type:
std_msgs/Int32
- Description: Controls the left back motor of the robot. Make sure
/motor_control/enable
is set totrue
for this to take effect.
To control a motor:
ros2 topic pub -1 /motor_control/right_front std_msgs/msg/Int32 "{data: 100}"
Note
The values range from -255 to 255 with 255 being the highest speed in forward direction and -255 being the highest speed in backward direction.
- Type:
std_msgs/Int32
- Description: Provides navigation status information of the robot.
- Type:
std_msgs/String
- Description: Provides network connectivity status of the robot.
- Type:
std_msgs/Int32
- Description: This topic is of type
int
and is used to control the Proportional-Integral-Derivative (PID) controller.0
- Stop PID control1
- Fast PID control2
- Smooth PID control3
- Supersmooth PID control
Here's an example:
ros2 topic pub -1 /pid/control std_msgs/msg/Int32 "{data: 1}"
- Type:
std_msgs/Bool
- Description: Controls the enabling/disabling of custom PID modes.
- Type:
std_msgs/Float32MultiArray
- Description: Updates the PID constants.
- Type:
std_msgs/Float32MultiArray
- Description: Saves custom PID configurations.
- Type:
std_msgs/Int32
- Description: Runs diagnostics tests on the robot. It serves the purpose of identifying and addressing any issues that may arise during the robot's operation. For detailed diagnostics procedures, refer to the documentation.
- Type:
geometry_msgs/Twist
- Description: Provides velocity commands in linear and angular dimensions.The
/cmd_vel
topic is responsible for receiving velocity commands for the robot. These commands can be generated by teleoperation or themove_base
module, instructing the robot on how fast to move in different directions.
Warning
Use with caution. The ECU (ESP32) will reset, and pins may enter a floating state.
- Type:
std_msgs/Bool
- Description: Handles ECU restart commands.
- Type:
std_msgs/Bool
- Description: Controls the enabling/disabling of buzzer functions.
- Type:
std_msgs/Bool
- Description: Controls the enabling/disabling of battery low warnings through the buzzer.
- Type:
std_msgs/Bool
- Description: The /hill_hold_control topic when enabled (It can be enabled by publishing true on /hill_hold_control topic) holds the robot on slope without any user input.
- Type:
std_msgs/Int32
- Description: The /microros_domain_id enables you to change your firmware's domain id permanently. Once changed, the firmware remembers your last set value and always boots up with the same domain id. (Currently set on domain-id 169)
To change the domain id, make sure microros agent is active, Open a new terminal and publish your custom domain id:
ros2 topic pub -1 /microros_domain_id std_msgs/msg/Int32 "{data: 169}"
The robot will change the domain ID and reset the ECU automatically to make the necessary changes. You will able to see the topics on your custom domain id now.
This topic provides information about the remaining battery percentage of the robot.
Battery Percentage | Beeping Sounds |
---|---|
100 - 20 | No beeping |
20 - 15 | Beep every 2 minutes |
15 - 10 | Beep every 1 minute |
Below 10 | Very frequent beeping |
0 (Complete Discharge) | Continuous beep |
Tip
To ensure you are aware of the robot's battery status, pay attention to the beeping sounds, especially as the battery percentage decreases.
Caution
Do not drain the battery below 10 %
, doing so can damage the battery permanently.
This topic reports the current battery voltage, ranging from 29.4V at maximum charge to 22.4V at minimum charge.
This topic provides an array of ticks for all four wheels of the robot, in the format [lf, lb, rf, rb]
. These values represent the encoder readings of the wheel ticks.
The /wheel/vel
topic sends an array of calculated current velocities for each wheel on the robot, received via encoders. The format of the array is [lf, lb, rf, rb]
, representing the actual velocity at which each wheel is moving.
- Type:
std_msgs/Int32MultiArray
- Description: Provides the RPM (Revolutions Per Minute) of the wheels in the format
[lf, lb, rf, rb]
.
- Type:
geometry_msgs/Twist
- Description: Publishes the robot's velocity commands.
- Type:
sensor_msgs/Imu
- Description: Provides IMU (Inertial Measurement Unit) data including orientation, angular velocity, and linear acceleration.
- Type:
std_msgs/Bool
- Description: Publishes the status of the Emergency Stop button.
- Type:
std_msgs/Bool
- Description: Publishes feedback on the Pixhawk control status.
The parameters for the robot can be dynamically reconfigured via rqt_reconfigure. Here are some key parameters:
Parameter | Value |
---|---|
Drive Type | Skid Steer Drive |
Diameter | 0.35m |
Wheel Separation Width | 0.58m |
Wheel Separation Length | 0.5 m |
Motor Type | DC Geared Motor |
RPM | 110 |
Encoder Type | Magnetic Encoder |
PPR (Pulses Per Revolution) | 600 |
Microcontroller | DOIT-ESP32 Devkit V1 |
Robot Payload Capacity | 200-250 kgs |
Battery Life | About 3 hours |
Battery Type | Lithium-ion 193AH 6S 24V |
The diagnostic tests are a set of procedures to ensure the proper functionality of the robot. They can be run using ROS tools.
- Make sure the robot is connected to the WiFi network.
- SSH into the robot's PC.
- Run the diagnostic scripts provided.
Here is how you can perform a detailed diagnostic:
cd ~/ros2_ws/src/diadem/diadem_firmware/scripts
python3 diadem_diagnostics.py
The diagnostics.py script will perform several checks:
- Check IMU data consistency.
- Check battery status.
- Check motor functionality.
- Verify topic publishing rates.
- It is crucial to execute the tests with caution and follow the on-screen instructions for each test to ensure accurate results.
- Ensure that the robot has sufficient space to move during the motor direction test (Test Number: 2).
- If any issues are identified during the tests, refer to the specific diagnostic output for guidance on addressing the problem.
- Ensure the robot is on a flat surface before running IMU diagnostics.
- Monitor the battery status to prevent running diagnostics on a low battery.
- If any tests fail, refer to the error logs for more information.
By following these instructions, you can perform diagnostic tests on the diadem robot to identify and resolve any issues with its components.
Step 1: Set your robot into charging mode before plugging in the charger
Note
The charger demands an input supply of upto 220V 16A AC. Make sure the power socket supports for the same.
Step 2: Plugin the charger
Warning
Precautions when opening the top panel of robot: Remove the thumb screws and slightly open up the top lid of the robot. Remove the realsense and gps cables before completely lifting the lid of the robot.
1. Camera Cable | 2. GPS Cable |
---|---|
Indication type | Indicates |
---|---|
All orange fading effect | ROS/RC not connected |
Indication type | Indicates |
---|---|
White Statuslights, White Headlights, Red Brakelights | ROS Mode Connected |
Indication type | Indicates |
---|---|
Blue Statuslights, White Headlights, Red Brakelights | Pixhawk Control over ROS |
Indication type | Indicates |
---|---|
Purple Statuslights, White Headlights, Red Brakelights | ROS Mode Connected |
Indication type | Indicates |
---|---|
Orange Indicatorlights, Red Brakelights | ForwardLeft Movement |
Indication type | Indicates |
---|---|
Orange Indicatorlights, Red Brakelights | ForwardRight Movement |
Indication type | Indicates |
---|---|
Orange Indicatorlights, Red Brakelights | RotateinPlace Movement |
Indication type | Indicates |
---|---|
Yellow Indicatorlights, Red Brakelights | ForwardLeft Movement |
Indication type | Indicates |
---|---|
Red Indicatorlights, Red Brakelights | Battery Low indication |
Indication type | Indicates |
---|---|
All lights red | Emergency button pressed |