Skip to content

DenWaritthon/CarverSeekBot

Repository files navigation

CarverSeekBot ROS2

Project Restore CarverCab to CarverSeekBot

Update Log

Update 2/06/68 [11.20]

Code requires refactoring and proper commenting.

Table of contents

Technical overview

System Architecture

Mobile Robot Development method

  • Use Nav2 package is base on develop robot navigation for CarverSeekBot
  • Use Robot Localized package for use Extended Kalman Filter.

Face Matching method

Use the buffalo_l model from InsightFace Opensource. This model can perform face recognition, face detection, face alignment, and facial feature analysis. All functions can be developed into a search mode to turn CarverCap into CarverSeekBot.

How to install

Prerequisites

Software Requirements

Ensure you have the following dependencies installed

ROS2 Package

Python Libraries:

Note

"I'm not entirely sure if the list of packages is exhaustive.

Hardware

Note

For future developers working with the CarverSeekBot, please note the current network IP assignments on the NUC:

  • SICK TIM: 192.168.1.190
  • Controllino Maxi Automation: 192.168.1.191
  • NUC: 192.168.1.195

These IP addresses are hardcoded for specific devices to ensure consistent communication within the CarverSeekBot system

RouterOS Version: If you need to reconfigure the MikroTik hAP ac lite tc, please ensure you use RouterOS 6 only. This specific model (MikroTik hAP ac lite tc) does not support RouterOS 7.

1. Make Workspace

# Make WorkSpace
mkdir -p CarverSeekbot_ws/src
# Go to workspace
cd CarverSeekbot_ws/src

2. Clone CarverSeekBot Package

#Clone CarverSeekBot 
git clone https://github.com/DenWaritthon/CarverSeekBot.git -b Jazzy

# Fetch linked repositories using vcs
vcs import < CarverSeekBot/CarverSeekBot.repos CarverSeekBot/

# Install dependencies using rosdep (including ROS)
sudo apt update
sudo apt install -y python3-rosdep python3-vcstool
sudo rosdep init
rosdep update --rosdistro=jazzy
rosdep install --from-paths src --ignore-src -r -y --rosdistro jazzy

3. Build this workspace

# Build all packages in the workspace
cd ~/CarverSeekbot_ws
colcon build

How to run Package

Step by Step

1. Run MicroROS for IMU (M5StickC)

ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/m5c

Note

The /dev/m5c port is exclusively configured for use on the CarverSeekBot's NUC.

Caution

Please be aware of the following points regarding the M5StickC >acting as the IMU:

  • Manual Restart Required: The M5StickC's current firmware does not automatically restart when the Micro-ROS Agent is launched. This means you'll need to manually power cycle the M5StickC every time you start or restart the robot, or if the connection to the Micro-ROS Agent is lost.

  • IMU Recalibration After Removal: If the M5StickC is detached from the robot, it will require a recalibration of the IMU upon reattachment. This is necessary to ensure optimal and accurate IMU data for improved performance.

1.1 IMU Calibration

ros2 run robot_controller imu_calibrate.py

2. Launch bringup

ros2 launch robot_bringup robot_bringup.launch.py

You can now control the robot using the Xbox joystick (via robot_bringup) or with teleop_twist_keyboard.

3. Launch navigation (Nav2)

The navigation system is currently configured to operate exclusively on the 5th floor, as defined by the keepout map.

Caution

Currently, the navigation and SLAM systems utilize only the front-facing LiDAR. This is due to integration issues encountered when attempting to combine data from both the RPLiDAR A1M8 and the SICK TIM781S. These issues affected map generation and navigation accuracy, so only the front LiDAR is active at this time.

As a result, the robot has no awareness of its surroundings to the rear or sides. Please exercise caution during operation, especially in environments with obstacles behind or beside the robot.

ros2 launch robot_navigation navigation.launch.py

3.1 Using SLAM for mapping

When Need to create map for navigation

ros2 launch robot_navigation mapping.launch.py

When Save map done

ros2 launch robot_navigation savemap.launch.py

Note

Once a map is successfully generated, it will be saved to your /home/ directory. Each generated map will have a unique ID appended to its filename, ensuring no conflicts occur. (Special thanks to AJ.Nook for this feature.)

3.2 Using Seek mode

The robot's "Seek Mode" currently offers two distinct methods for defining and executing navigation paths:

3.2.1 Fixed Path Navigation

This method utilizes a pre-defined, fixed destination. Upon launching the associated node, the robot will automatically navigate to a target coordinate of x: 8, y: 0, z: 0. During this navigation, the system will monitor for a specific face detection, as determined by the face_matcher node. If the specified face is detected, a command will be sent to cancel the ongoing navigation.

Usage:

ros2 run robot_navigation cancel_navigation_service_fix_path.py

3.2.2 Custom Path Navigation (Service-Based)

This method allows for dynamic definition of the robot's target destination using a ROS2 service. You can specify the desired target coordinates by calling the /set_navigation_position service:

Set Target Position:

ros2 service call /set_navigation_position robot_interfaces/srv/Target2Go "target:
  x: 8.0
  y: 0.0
  z: 0.0
  w: 1.0"

Once the target position is set, you can initiate the navigation process by calling the start_navigation service:

Start Navigation:

ros2 service call /start_navigation std_srvs/srv/Trigger "{}"

Note

This "Custom Path Navigation" mode has not yet been tested on the physical robot. It has only been validated in development environments.

3.2.3 Face Matching Configuration

The face_match node allows you to dynamically change the target face ID for detection. Please note that you can only switch between face IDs that are already pre-registered or available within the system's database.

To change the detection ID, call the /change_face_id service: Change Detection ID:

ros2 service call /change_face_id robot_interfaces/srv/ChangeIDmatch "id_match: 002"

Demo

Demo Click to watch VDO

Future plan

  • Update power input for NUC from 12VDC to 19VDC for use full performance of NUC
  • Fine-tune Nav2 parameters for improved navigation accuracy
  • Implement automatic reverse movement upon obstacle collision during navigation
  • Add a front bumper to the robot (design completed, pending laser cut and sensor integration)
  • Integrate a navigation camera (e.g., Intel RealSense) — currently under research
  • Add state management system to handle robot behavior transitions
  • Integrate LiDAR intensity data from the front sensor to enhance navigation capabilities (not yet implemented)
  • Investigate and resolve discrepancies when merging data from the two LiDAR sensors (RPLiDAR A1M8 and SICK TIM781S)

Inspection of mechanical and electrical problems

This part for check list in case Carver Cab have an Electrical and Mechanical Problems.

  • In case the NUC does not power on automatically after turning off the power switch and waiting for 3 minutes, you can unplug the power and plug it back in, as there is not enough power to start the NUC at startup.
  • Sensor and Motor not have input voltage — check cable connection at PS1 and PS2 terminal
  • In case limit switch don't update data after bumper attack — check if the fastening nuts have moved.
  • If the Carver Cab vibrates more than normal during movement — check the front support wheels to make sure they are in good condition (since the wheels have worn out springs, they need to be supported with rubber pads).

Developer Member

  • 64340500049 - Wasupol Hengsritawat
  • 65340500004 - Kraiwich Vichakhot
  • 65340500014 - Chawaphon Wachiraniramit
  • 65340500050 - Waritthon Kongnoo

About

Project Restore CarverCab to CarverSeekBot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •