Repository navigation
Setup your robot
This tutorial provides a comprehensive guide to establishing a solid foundation for your openAMR mobile robot's control system. We'll delve into the intricacies of setting up the base controller, leveraging the established framework of the Linorobot project as a starting point. By incorporating advanced components such as BLDC motors, encoders, and drivers, we'll enhance the robot's precision, controllability, and overall performance.
Hardware assembly: refer to the Linorobot tutorial for detailed instructions on assembling the robot's physical components. Ensure compatibility with BLDC motors, encoders, and drivers.
Scheme
PID tuning: Utilize the lino_pid tool to optimize the PID controller parameters for your specific hardware setup. This is crucial for achieving desired robot performance.
ROS integration: Configure the ROS navigation stack to communicate with the Teensy board via rosserial_python.
Code upload: flash the base controller code onto the Teensy board. This code translates velocity commands from ROS into PWM signals for motor control.
Please use Linorobot's instructions to load HW onto your board.
We are actively developing MODBUS and CAN control. These protocols will enable integration with a wider range of BLDC motors and provide additional control options.
We want to provide our PCB for work with motor drivers, range sensors, etc
By following these steps and leveraging the openAMR project, you can build a robust and customizable mobile robot platform.
Odometry is a crucial component of a mobile robot's self-localization. It involves estimating the robot's pose (position and orientation) by integrating wheel encoder measurements. This section outlines the process of setting up odometry for your OpenAMR robot, building upon the foundation laid by the Linorobot project.
The initial step is to process raw data from the wheel encoders. These measurements, typically in terms of tick counts, are converted into linear and angular velocities of the robot. This involves:
-
Reading encoder values: acquiring encoder tick counts at a regular interval.
-
Calculating wheel velocities: determining the linear velocity of each wheel based on the change in encoder ticks over time and wheel radius.
-
Computing robot velocities: combining the wheel velocities to obtain the robot's linear and angular velocities.
-
Publishing raw odometry data: broadcasting the calculated linear and angular velocities as a "raw_odom" topic.
To enhance odometry accuracy, we fuse the raw odometry data with information from an Inertial Measurement Unit (IMU). This involves:
-
Acquiring IMU data: reading orientation data (roll, pitch, yaw) from the IMU.
-
Sensor fusion: integrating the raw odometry and IMU data using an Extended Kalman Filter (EKF) provided by the robot localization package. The EKF effectively combines the complementary strengths of both sensors.
-
Publishing fused odometry data: broadcasting the refined odometry data, incorporating both encoder and IMU measurements, as the primary odometry source for the robot.
Achieving accurate odometry requires careful configuration and tuning. Refer to the Linorobot documentation for detailed instructions on:
-
Encoder calibration: ensuring correct conversion of encoder ticks to linear distances.
-
IMU calibration: correcting IMU biases and offsets.
-
EKF parameter tuning: optimizing the EKF's performance based on your robot's characteristics.
-
Odometry error analysis: evaluating odometry accuracy through experiments and data analysis.
By following these steps, you'll ensure that your openAMR robot has reliable odometry data. This is fundamental for navigation, mapping, and other robot behaviors. For in-depth guidance on the configuration and tuning of the odometry system, refer to the Linorobot's instructions.
To achieve full autonomy, the navigation stack requires a robot to have at least one source of laser information to perceive the robot's environment and avoid obstacles along its way. Laser scanners, often referred to as LiDARs, are indispensable for mobile robots operating in dynamic environments. They provide a 360-degree or partial field of view of the surroundings (120-degree available with current chassis), enabling the robot to accurately perceive obstacles, free space, and other relevant environmental features. This information is crucial for tasks such as navigation, obstacle avoidance, and mapping. We use RPLidar in OpenAMR project
By following these steps, you'll ensure that your openAMR Lidar is configured correctly. (use linorobot instruction)
TF (Transform) is a fundamental component of the ROS ecosystem, providing a framework for representing and managing coordinate frames and their relationships. In the context of a mobile robot like OpenAMR, TF is essential for:
-
Sensor data integration: accurately transforming sensor measurements (e.g., from laser scanners, cameras, IMUs) into a common coordinate frame.
-
Robot localization: tracking the robot's pose (position and orientation) in the world frame.
-
Path planning and control: transforming waypoints and control commands between different coordinate frames.
-
Visualization: displaying the robot and its sensors in a 3D environment for debugging and analysis.
By following these steps, you'll ensure that your openAMR TFs are configured correctly. This mean spatial relationships between your robot’s subsystems and sensors (use linorobot instruction)
Creating accurate maps, achieving reliable robot localization within those maps, and executing efficient navigation are fundamental capabilities for any autonomous robot. Before attempting complex tasks, it's crucial to ensure these core functionalities are working correctly. This section provides a step-by-step guide for verifying map creation, localization, and navigation on your OpenAMR robot.
-
SLAM configuration: configure the Simultaneous Localization and Mapping (SLAM) algorithm using ROS tools. We use amcl_package and gmapping_package for these tasks.
-
Map building: drive your OpenAMR robot in a controlled manner throughout its operational environment. The SLAM algorithm will progressively build a map based on sensor data (typically laser scanner information). Ensure the robot covers all areas of interest for complete map coverage.
-
Map visualization: use RViz, a ROS visualization tool, to view the generated map. Verify if the map accurately represents the environment, including walls, obstacles, and open spaces. Look for inconsistencies or missing areas that might require additional mapping runs.
-
Map saving and loading: save the generated map to a file for future use. Test the functionality by loading the saved map and verifying if the robot correctly positions itself within the pre-built map.
-
Goal setting: define goals for the robot using navigation tools like RViz. These goals specify desired locations within the map that the robot should navigate towards.
-
Navigation execution: command the robot to navigate towards the set goals. Observe its behavior:
-
Path planning: does the robot plan a feasible path to the goal, avoiding obstacles in the map?
-
Localization accuracy: does the robot maintain accurate localization within the map during navigation?
-
Motion control: does the robot execute smooth and controlled movements to reach the goal?
-
-
Testing in different environments: evaluate the navigation performance in various scenarios with varying complexities and potential obstacles. This helps identify limitations and areas for improvement.
By following these steps, you'll ensure that your mapping and navigation systems are configured correctly. (use linorobot instructions for mapping and navigation)