mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
Test Class Reference
+ Inheritance diagram for Test:
+ Collaboration diagram for Test:

Public Member Functions

void callback1 (visualization_msgs::msg::MarkerArray::SharedPtr msg)
 
void callback1 (mrs_msgs::msg::ProfilerUpdate::ConstSharedPtr msg)
 
void callback1 (std_msgs::msg::Int64::ConstSharedPtr msg)
 
void callbackService (const std::shared_ptr< std_srvs::srv::SetBool::Request > request, std::shared_ptr< std_srvs::srv::SetBool::Response > response)
 
void callbackRepeatedService (const std::shared_ptr< std_srvs::srv::SetBool::Request > request, std::shared_ptr< std_srvs::srv::SetBool::Response > response)
 
void callbackFailedService (const std::shared_ptr< std_srvs::srv::SetBool::Request > request, std::shared_ptr< std_srvs::srv::SetBool::Response > response)
 
void callbackService (const std::shared_ptr< std_srvs::srv::SetBool::Request > request, std::shared_ptr< std_srvs::srv::SetBool::Response > response)
 
void callbackRepeatedService (const std::shared_ptr< std_srvs::srv::SetBool::Request > request, std::shared_ptr< std_srvs::srv::SetBool::Response > response)
 
void callbackFailedService (const std::shared_ptr< std_srvs::srv::SetBool::Request > request, std::shared_ptr< std_srvs::srv::SetBool::Response > response)
 
void callback1 (const std_msgs::msg::Int64::ConstSharedPtr msg)
 
void timeoutCallback (const std::string &topic_name, const rclcpp::Time &last_msg)
 
void callback1 (std_msgs::msg::Int64::ConstSharedPtr msg)
 

Protected Member Functions

void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void test_batch_visualizer_init (const std::string &viz_topic_name_, const std::string &viz_ns_name_, const double point_scale=0.02, const double line_scale=0.04)
 
void test_batch_visualizer_msg (const int marker_idx, const std::vector< std::tuple< double, double, double > > &points, const std::vector< std::tuple< double, double, double, double > > &colors, std::size_t point_marker_vec_size=1, std::size_t line_marker_vec_size=2, std::size_t triangle_marker_vec_size=3)
 
std::tuple< double, double, double > point_to_tuple (const geometry_msgs::msg::Point &point)
 
std::tuple< double, double, double, double > color_to_tuple (const std_msgs::msg::ColorRGBA &color)
 
std::vector< std::tuple< double, double, double > > make_vector_tuple (const std::vector< geometry_msgs::msg::Point > &points)
 
std::vector< std::tuple< double, double, double, double > > make_vector_tuple (const std::vector< std_msgs::msg::ColorRGBA > &colors)
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void do_test (const bool use_threadtimer)
 
void timerCallback (void)
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void initialize (const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void spin ()
 
void despin ()
 
void publish_transforms (const rclcpp::Time &t=rclcpp::Time(0))
 
std::optional< geometry_msgs::msg::TransformStamped > wait_for_tf (const std::string &from, const std::string &to, mrs_lib::Transformer &tfr, const rclcpp::Time &publish_t=rclcpp::Time(0), const rclcpp::Time &stamp=rclcpp::Time(0))
 
bool compare_gt_latlon (const geometry_msgs::msg::Point &tv, const geometry_msgs::msg::Point &rv, const char utm_zone[10], const bool ll2local)
 
bool compare_gt_latlon (const quat_t &tv, const quat_t &rv, const char utm_zone[10], const bool ll2local)
 
template<typename T >
bool trytransform_latlon (const T &tv, mrs_lib::Transformer &tfr, const char utm_zone[10], const bool ll2local, const bool expect_ok)
 

Static Protected Member Functions

static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool compare_tuple3 (const std::tuple< double, double, double > &lhs, const std::tuple< double, double, double > &rhs)
 
static bool compare_tuple4 (const std::tuple< double, double, double, double > &lhs, const std::tuple< double, double, double, double > &rhs)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 

Protected Attributes

rclcpp::Node::SharedPtr node_
 
rclcpp::executors::SingleThreadedExecutor::SharedPtr executor_
 
std::thread main_thread_
 
std::promise< bool > finished_promise_
 
std::future< bool > finished_future_
 
double range_min_ = -20.0
 
double range_max_ = 20.0
 
std::mt19937 generator_ {10}
 
std::uniform_real_distribution rand_dbl_ {range_min_, range_max_}
 
std::uniform_real_distribution rand_percent_ {0.0, 1.0}
 
rclcpp::Subscription< visualization_msgs::msg::MarkerArray >::SharedPtr sub_
 
visualization_msgs::msg::MarkerArray::ConstSharedPtr received_msg_
 
BatchVisualizer bv_
 
std::string viz_ns_name_ = "map"
 
std::string viz_topic_name_ = "batch_viz"
 
int batch_size_ = 4
 
rcpputils::fs::path test_resources_path {TEST_RESOURCES_DIRECTORY}
 
std::atomic< bool > received_ = false
 
mrs_lib::Profiler profiler_
 
int num_received = 0
 
int num_to_send = 1234
 
rclcpp::Executor::SharedPtr executor_
 
std::atomic< bool > timeouted_ = false
 
std::shared_ptr< mrs_lib::TimeoutManagertom_
 
std::shared_ptr< std::atomic< bool > > test_stop_from_cbk
 
double rate_ = 50
 
int n_cbks_ = 0
 
bool cbks_in_time_ = true
 
bool null_cbk_ = false
 
bool cbks_ok_ = true
 
std::mutex cbk_running_mtx_
 
std::atomic< bool > cbk_running_ = false
 
std::atomic< bool > test_stop_from_cbk_ = false
 
std::shared_ptr< mrs_lib::MRSTimertimer_
 
std::optional< rclcpp::Time > last_time_callback_
 
mrs_lib::TransformBroadcaster tf_broadcaster_
 
std::shared_ptr< tf2_ros::Buffer > tf_buffer_
 
std::shared_ptr< tf2_ros::TransformListener > tf_listener_
 
Eigen::Affine3d local2local
 
Eigen::Affine3d local2fcu
 
Eigen::Affine3d local2utm
 
Eigen::Affine3d fcu2cam
 

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