No version for distro humble showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro kilted showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro lyrical showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro rolling showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro ardent showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro bouncy showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro crystal showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro eloquent showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro dashing showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro galactic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro foxy showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro iron showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro lunar showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro jade showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro indigo showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro hydro showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro kinetic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro melodic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange

No version for distro noetic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.1.0
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/WATonomous/wato_monorepo.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

C++ language generic utilities, independent of any other dependencies or frameworks

Maintainers

  • WATonomous

Authors

No additional authors.

wato_test

A ROS 2 testing framework built on Catch2 that provides test fixtures and utilities for testing ROS nodes, services, and communication patterns.

Features

  • TestExecutorFixture: Manages ROS executor lifecycle for tests
  • Test Nodes: Pre-built nodes for testing publishers, subscribers, services, and clients
    • Discovery Waiting: PublisherTestNode::wait_for_subscribers() and SubscriberTestNode::wait_for_publishers() poll DDS discovery state with a timeout, replacing fragile hardcoded sleeps
    • Future-based Messaging: SubscriberTestNode::expect_next_message() returns a std::future that resolves when the next message arrives
  • CMake Integration: Simple add_wato_test() function for creating tests
  • Catch2 Integration: Built on Catch2 for modern C++ testing

Quick Start

#include <catch2/catch_all.hpp>
#include <std_msgs/msg/string.hpp>
#include <wato_test/wato_test.hpp>

#include "test_nodes/publisher_test_node.hpp"
#include "test_nodes/subscriber_test_node.hpp"

TEST_CASE_METHOD(wato::test::TestExecutorFixture, "My ROS Test", "[ros]") {
  auto pub = std::make_shared<wato::test::PublisherTestNode<std_msgs::msg::String>>("/topic", "pub");
  auto sub = std::make_shared<wato::test::SubscriberTestNode<std_msgs::msg::String>>("/topic", "sub");
  add_node(pub);
  add_node(sub);
  start_spinning();

  // Wait for DDS discovery (replaces hardcoded sleeps)
  REQUIRE(pub->wait_for_subscribers(1));
  REQUIRE(sub->wait_for_publishers(1));

  SECTION("Publish and receive") {
    auto future = sub->expect_next_message();

    std_msgs::msg::String msg;
    msg.data = "hello";
    pub->publish(msg);

    REQUIRE(future.get().data == "hello");
  }
}

Package.xml Usage

<test_depend>wato_test</test_depend>

CMake Usage

find_package(wato_test REQUIRED)

add_wato_test(my_test
  test/my_test.cpp
  LIBRARIES
    my_package::my_library
    std_msgs::std_msgs
)

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged wato_test at Robotics Stack Exchange