Apartment Navigation By Classic Wheeled Robot
Comprehensive Production Grade Repository For Apartment Navigation Project (Inspired By Udacity Course)
 
Loading...
Searching...
No Matches
test_controllers_config Namespace Reference

Functions

dict controllers (Path description_dir)
 
float _wheel_radius_from_urdf (ET.Element urdf_root)
 
float _wheel_separation_from_urdf (ET.Element urdf_root)
 
None test_wheel_radius_matches_urdf (ET.Element urdf_root, dict controllers)
 
None test_wheel_separation_matches_urdf (ET.Element urdf_root, dict controllers)
 

Detailed Description

@brief Validates that hardcoded geometry values in controllers.yaml match the URDF.

wheel_radius and wheel_separation cannot use xacro expressions in YAML,
so they must be kept in sync manually. These tests catch drift.

Function Documentation

◆ _wheel_radius_from_urdf()

float test_controllers_config._wheel_radius_from_urdf ( ET.Element urdf_root)
protected
@brief Extract the wheel radius from the left_wheel link geometry in the URDF.

@param urdf_root Parsed root XML element of the expanded URDF.
@return Wheel radius in metres.

◆ _wheel_separation_from_urdf()

float test_controllers_config._wheel_separation_from_urdf ( ET.Element urdf_root)
protected
Extract wheel separation from the left wheel joint's y-offset.

Each wheel is placed at ±(chassis_width/2 + wheel_length/2) from centre,
so separation = 2 * |y_offset|.

◆ controllers()

dict test_controllers_config.controllers ( Path description_dir)
@brief Load and return the diff_drive_controller configuration from YAML.

@param description_dir Path to the robot_description package root.
@return Parsed YAML configuration as a dictionary.

◆ test_wheel_radius_matches_urdf()

None test_controllers_config.test_wheel_radius_matches_urdf ( ET.Element urdf_root,
dict controllers )
Wheel radius in controllers.yaml must match the URDF geometry.

◆ test_wheel_separation_matches_urdf()

None test_controllers_config.test_wheel_separation_matches_urdf ( ET.Element urdf_root,
dict controllers )
Wheel separation in controllers.yaml must match URDF joint placement.