This document describes the curated CMake-based test and example targets for
libaria.
The original tests/ and examples/ directories contain many legacy programs.
Some are deterministic and safe to run automatically. Others connect to hardware,
expect operator input, or can move the robot. Those are intentionally kept out of
the automated runner.
The top-level CMakeLists.txt now includes curated build sections for legacy tests and examples.
Available options:
LIBARIA_BUILD_LEGACY_TEST_PROGRAMS=ONLIBARIA_BUILD_LEGACY_EXAMPLE_PROGRAMS=ONLIBARIA_BUILD_SAFE_TEST_RUNNER=ONLIBARIA_BUILD_HARDWARE_TEST_RUNNER=ONLIBARIA_REGISTER_HARDWARE_CTEST=OFF
Default behavior is to build the curated targets and the safe runner.
Build from the workspace root:
cd /home/ubuntu/colcon_ws
colcon build --packages-select libariaThe master runner executable is:
/home/ubuntu/colcon_ws/build/libaria/libaria_safe_test_runnerIt launches each curated non-motion executable, records whether it exited successfully, prints a summary, and writes a text report to the current working directory.
Default report file:
libaria_safe_test_report.txt
Custom report path:
/home/ubuntu/colcon_ws/build/libaria/libaria_safe_test_runner \
--report /tmp/libaria_safe_test_report.txtYou can also run it through CMake:
cd /home/ubuntu/colcon_ws/build/libaria
cmake --build . --target run_libaria_safe_testsOr through CTest:
cd /home/ubuntu/colcon_ws/build/libaria
ctest --output-on-failure -R libaria_safe_test_runnerThe hardware runner is a separate executable for robot-required programs:
/home/ubuntu/colcon_ws/build/libaria/libaria_hardware_test_runnerThis runner is intentionally separate from the safe suite because it is expected to fail when no robot is connected.
Default report file:
libaria_hardware_test_report.txt
You can pass common robot connector arguments to every program after --:
/home/ubuntu/colcon_ws/build/libaria/libaria_hardware_test_runner \
--report /tmp/libaria_hardware_test_report.txt \
-- -robotPort /dev/ttyUSB0Or for a remote target:
/home/ubuntu/colcon_ws/build/libaria/libaria_hardware_test_runner \
-- --remoteHost 192.168.0.10There is also a build target:
cd /home/ubuntu/colcon_ws/build/libaria
cmake --build . --target run_libaria_hardware_testsBy default the hardware runner is not registered with CTest. If you want it available through CTest on a robot-equipped machine, configure with:
-DLIBARIA_REGISTER_HARDWARE_CTEST=ONThen run:
ctest --output-on-failure -R libaria_hardware_test_runneractionArgumentTestactionAverageTestangleBetweenTestangleFixTestangleTestlineTestmathTestsrobotListTest
functorExamplethreadExample
These were selected because they do not intentionally connect to a robot, drive hardware, or require an operator to steer or supervise motion.
The following curated programs are built by CMake but are not part of the safe runner because they involve a live robot connection, can move hardware, or both.
These same programs are the current members of the hardware runner suite.
absoluteHeadingActionTestsimpleConnectsimpleMotionCommandsteleopActionsExample
Purpose:
- Verify that ARIA can connect to the robot controller
- Print a small amount of robot state
Run:
/home/ubuntu/colcon_ws/build/libaria/simpleConnectTypical override arguments:
/home/ubuntu/colcon_ws/build/libaria/simpleConnect -robotPort /dev/ttyUSB0Expected result:
- Connects successfully
- Prints pose and battery information
- Exits cleanly after a short delay
Purpose:
- Verify basic direct motion commands
Run only in a clear, supervised area.
Run:
/home/ubuntu/colcon_ws/build/libaria/simpleMotionCommandsExpected result:
- Connects to the robot
- Drives forward and rotates using direct commands
- Stops and exits cleanly
Operator procedure:
- Clear at least several meters around the robot.
- Confirm you can reach the robot emergency stop.
- Start the program.
- Watch each commanded move.
- Stop the robot manually if behavior is not as expected.
Purpose:
- Verify guarded teleoperation with ARIA actions
Run:
/home/ubuntu/colcon_ws/build/libaria/teleopActionsExampleExpected result:
- Connects to the robot
- Accepts keyboard or joystick teleoperation
- Uses obstacle-aware action behavior when sensors are configured
Operator procedure:
- Start in an open area.
- Confirm sonar or laser devices are configured if you expect guarded behavior.
- Drive slowly at first.
- Verify stop behavior before testing longer motion.
Purpose:
- Verify heading-control behavior using an action that commands absolute heading
Run:
/home/ubuntu/colcon_ws/build/libaria/absoluteHeadingActionTestExpected result:
- Connects to the robot
- Rotates to a sequence of headings
- Prints the heading reached after each move
Operator procedure:
- Place the robot in a clear area with rotational clearance.
- Confirm motors can be safely enabled.
- Start the program and observe each heading change.
- Stop immediately if heading response is unstable or excessive.
Use this order when validating the library after changes:
- Build
libariawith colcon. - Run the safe runner.
- Run the non-ROS CLI in cli.md to verify ArNetworking connectivity.
- Run the hardware runner or selected manual hardware programs on a robot-equipped machine.
- Run motion-capable programs only with an operator present.
This is intentionally a curated first pass, not a complete migration of every
legacy source file under tests/ and examples/ into modern CMake targets.
Many legacy programs are hardware-specific, device-specific, or written for one-
off development investigations. More can be added incrementally after they are
classified as either:
- safe for automated execution
- build-only and manual-run
- unsupported legacy programs that should stay as source reference only