https://github.com/andy-leo10/tortoisebot_ros2_test
https://github.com/andy-leo10/tortoisebot_ros2_test
gtest ros2 testing
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andy-leo10/tortoisebot_ros2_test
- Owner: Andy-Leo10
- Created: 2024-04-02T20:37:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T16:31:11.000Z (about 2 years ago)
- Last Synced: 2025-06-06T04:29:26.198Z (12 months ago)
- Topics: gtest, ros2, testing
- Language: C++
- Homepage:
- Size: 377 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tortoisebot_ros2_test
## Simulation
**start**
```shell
source ~/ros2_ws/install/setup.bash
ros2 launch tortoisebot_bringup bringup.launch.py use_sim_time:=True
```
**fix simulation**
```shell
./fix_sim.bash
```
## Action
**compile**
```shell
cd ~/ros2_ws/ ;colcon build;source install/setup.bash
```
**start server**
```shell
source ~/ros2_ws/install/setup.bash
ros2 run tortoisebot_waypoints tortoisebot_action_server
```
**run client**
```shell
source ~/ros2_ws/install/setup.bash
ros2 run tortoisebot_waypoints exp_action_client
```
or
```shell
ros2 action send_goal -f /tortoisebot_as tortoisebot_waypoints/action/WaypointAction "position:
x: 0.5
y: 0.5
z: 0.0"
```
## TEST
build
```shell
cd ~/ros2_ws/ ;colcon build;source install/setup.bash
```
run test
```shell
colcon test --packages-select tortoisebot_waypoints --event-handler=console_direct+
```
check summary
```shell
colcon test-result --test-result-base build/tortoisebot_waypoints
```
clean tests
```
rm -r ~/ros2_ws/build/tortoisebot_waypoints/test_results
rm -r ~/ros2_ws/build/tortoisebot_waypoints/Testing
```
## RESULTS
> [!NOTE] test-pass:
tests pass correctly if the goal is reached before and before timeout

> [!CAUTION] test-fail:
tests don't pass correctly if the goal is not reached or due to timeout
