scenario_simulator_v2 C++ API
Functions
test_utils.hpp File Reference
#include <geometry_msgs/msg/point.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/vector3.hpp>
#include <traffic_simulator_msgs/msg/bounding_box.hpp>
Include dependency graph for test_utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

geometry_msgs::msg::Point makePoint (double x, double y, double z=0.0)
 
geometry_msgs::msg::Vector3 makeVector (double x, double y, double z=0.0)
 
geometry_msgs::msg::Pose makePose (double x, double y, double z=0.0, geometry_msgs::msg::Quaternion q=geometry_msgs::msg::Quaternion())
 
traffic_simulator_msgs::msg::BoundingBox makeBbox (double dim_x, double dim_y, double dim_z=0.0, double center_x=0.0, double center_y=0.0, double center_z=0.0)
 

Function Documentation

◆ makeBbox()

traffic_simulator_msgs::msg::BoundingBox makeBbox ( double  dim_x,
double  dim_y,
double  dim_z = 0.0,
double  center_x = 0.0,
double  center_y = 0.0,
double  center_z = 0.0 
)
inline

Generates a bounding box with the given dimensions and center coordinates.

Parameters
dim_xThe dimension of the bounding box along the x-axis.
dim_yThe dimension of the bounding box along the y-axis.
dim_zThe dimension of the bounding box along the z-axis. (default = 0.0)
center_xThe x-coordinate of the center of the bounding box. (default = 0.0)
center_yThe y-coordinate of the center of the bounding box. (default = 0.0)
center_zThe z-coordinate of the center of the bounding box. (default = 0.0)
Returns
The generated bounding box.

◆ makePoint()

geometry_msgs::msg::Point makePoint ( double  x,
double  y,
double  z = 0.0 
)
inline

Creates a geometry_msgs::msg::Point object with the specified coordinates.

Parameters
xThe x-coordinate of the point.
yThe y-coordinate of the point.
zThe z-coordinate of the point. Defaults to 0 if not provided.
Returns
The created geometry_msgs::msg::Point object with the specified coordinates.

◆ makePose()

geometry_msgs::msg::Pose makePose ( double  x,
double  y,
double  z = 0.0,
geometry_msgs::msg::Quaternion  q = geometry_msgs::msg::Quaternion() 
)
inline

Generates a Pose message with the given coordinates and orientation.

Parameters
xThe x-coordinate of the position.
yThe y-coordinate of the position.
zThe z-coordinate of the position (default: 0).
qThe orientation of the pose (default: identity quaternion).
Returns
A Pose message with the specified coordinates and orientation.

◆ makeVector()

geometry_msgs::msg::Vector3 makeVector ( double  x,
double  y,
double  z = 0.0 
)
inline

Creates a geometry_msgs::msg::Vector3 object with the specified values for x, y, and z coordinates.

Parameters
xThe value for the x coordinate.
yThe value for the y coordinate.
zThe value for the z coordinate. Default value is 0.
Returns
A geometry_msgs::msg::Vector3 object with the specified values for x, y, and z coordinates.