moveit2
The MoveIt Motion Planning Framework for ROS 2.
Protected Member Functions | Protected Attributes | List of all members
moveit_setup::MoveItSetupTest Class Reference

Test environment with DataWarehouse setup and help for generating files in a temp dir. More...

#include <testing_utils.hpp>

Inheritance diagram for moveit_setup::MoveItSetupTest:
Inheritance graph
[legend]
Collaboration diagram for moveit_setup::MoveItSetupTest:
Collaboration graph
[legend]

Protected Member Functions

void SetUp () override
 Initialize the node, DataWarehouse and output dir. More...
 
template<typename T >
void generateFiles (const std::string &config_name)
 Helper function for generating all the files for a particular config to a temporary directory. More...
 
void initializeStep (SetupStep &setup_step)
 
void TearDown () override
 Clean up by removing all files when complete. More...
 

Protected Attributes

rclcpp::Node::SharedPtr node_
 
moveit_setup::DataWarehousePtr config_data_
 
std::filesystem::path output_dir_
 
moveit_setup::GeneratedTime placeholder_timestamp_
 
bool delete_when_finished_ { true }
 

Detailed Description

Test environment with DataWarehouse setup and help for generating files in a temp dir.

Definition at line 50 of file testing_utils.hpp.

Member Function Documentation

◆ generateFiles()

template<typename T >
void moveit_setup::MoveItSetupTest::generateFiles ( const std::string &  config_name)
inlineprotected

Helper function for generating all the files for a particular config to a temporary directory.

Uses the same template/config_name structure as DataWarehouse::get

Definition at line 71 of file testing_utils.hpp.

◆ initializeStep()

void moveit_setup::MoveItSetupTest::initializeStep ( SetupStep setup_step)
inlineprotected

Definition at line 81 of file testing_utils.hpp.

Here is the call graph for this function:

◆ SetUp()

void moveit_setup::MoveItSetupTest::SetUp ( )
inlineoverrideprotected

Initialize the node, DataWarehouse and output dir.

You may want to override this method to register data types after calling MoveItSetupTest::SetUp()

Definition at line 58 of file testing_utils.hpp.

◆ TearDown()

void moveit_setup::MoveItSetupTest::TearDown ( )
inlineoverrideprotected

Clean up by removing all files when complete.

Note that you only want to set delete_when_finished_ to false when testing locally

Definition at line 91 of file testing_utils.hpp.

Member Data Documentation

◆ config_data_

moveit_setup::DataWarehousePtr moveit_setup::MoveItSetupTest::config_data_
protected

Definition at line 98 of file testing_utils.hpp.

◆ delete_when_finished_

bool moveit_setup::MoveItSetupTest::delete_when_finished_ { true }
protected

Definition at line 101 of file testing_utils.hpp.

◆ node_

rclcpp::Node::SharedPtr moveit_setup::MoveItSetupTest::node_
protected

Definition at line 97 of file testing_utils.hpp.

◆ output_dir_

std::filesystem::path moveit_setup::MoveItSetupTest::output_dir_
protected

Definition at line 99 of file testing_utils.hpp.

◆ placeholder_timestamp_

moveit_setup::GeneratedTime moveit_setup::MoveItSetupTest::placeholder_timestamp_
protected

Definition at line 100 of file testing_utils.hpp.


The documentation for this class was generated from the following file: