scenario_simulator_v2 C++ API
Namespaces | Enumerations | Functions
helper.hpp File Reference
#include <simulation_api_schema.pb.h>
#include <algorithm>
#include <cmath>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/quaternion.hpp>
#include <geometry_msgs/msg/vector3.hpp>
#include <iostream>
#include <string>
#include <traffic_simulator/data_type/lanelet_pose.hpp>
#include <traffic_simulator_msgs/msg/action_status.hpp>
#include <traffic_simulator_msgs/msg/lanelet_pose.hpp>
#include <unordered_set>
#include <vector>
Include dependency graph for helper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 traffic_simulator
 
 traffic_simulator::helper
 

Enumerations

enum class  traffic_simulator::helper::LidarType { traffic_simulator::helper::VLP16 , traffic_simulator::helper::VLP32 }
 

Functions

traffic_simulator_msgs::msg::ActionStatus traffic_simulator::helper::constructActionStatus (double linear_vel=0, double angular_vel=0, double linear_accel=0, double angular_accel=0)
 helper function for constructing action status More...
 
LaneletPose traffic_simulator::helper::constructLaneletPose (lanelet::Id lanelet_id, double s, double offset=0, double roll=0, double pitch=0, double yaw=0)
 helper function for constructing lanelet pose More...
 
geometry_msgs::msg::Vector3 traffic_simulator::helper::constructRPY (double roll=0, double pitch=0, double yaw=0)
 helper function for constructing rpy More...
 
geometry_msgs::msg::Vector3 traffic_simulator::helper::constructRPYfromQuaternion (geometry_msgs::msg::Quaternion quaternion)
 helper function for constructing rpy More...
 
geometry_msgs::msg::Pose traffic_simulator::helper::constructPose (double x, double y, double z, double roll, double pitch, double yaw)
 helper function for constructing pose More...
 
template<typename T >
std::vector< T > traffic_simulator::helper::getUniqueValues (const std::vector< T > &input_vector)
 helper function for creating vector without duplicates, with preserved order More...
 
const simulation_api_schema::LidarConfiguration traffic_simulator::helper::constructLidarConfiguration (const LidarType type, const std::string &entity, const std::string &architecture_type, const double lidar_sensor_delay=0, const double horizontal_resolution=1.0/180.0 *M_PI)
 
const simulation_api_schema::DetectionSensorConfiguration traffic_simulator::helper::constructDetectionSensorConfiguration (const std::string &entity, const std::string &architecture_type, const double update_duration, const double range=300.0, const bool detect_all_objects_in_range=false, const double pos_noise_stddev=0, const int random_seed=0, const double probability_of_lost=0, const double object_recognition_delay=0, const double object_recognition_ground_truth_delay=0)
 
std::ostream & operator<< (std::ostream &os, const traffic_simulator::LaneletPose &ll_pose)
 
std::ostream & operator<< (std::ostream &os, const geometry_msgs::msg::Point &point)
 
std::ostream & operator<< (std::ostream &os, const geometry_msgs::msg::Vector3 &vector)
 
std::ostream & operator<< (std::ostream &os, const geometry_msgs::msg::Quaternion &quat)
 
std::ostream & operator<< (std::ostream &os, const geometry_msgs::msg::Pose &pose)
 
template<typename T >
auto operator+ (const std::vector< T > &v0, const std::vector< T > &v1) -> decltype(auto)
 
template<typename T >
auto operator+= (std::vector< T > &v0, const std::vector< T > &v1) -> decltype(auto)
 
template<typename T >
auto sortAndUnique (const std::vector< T > &data) -> std::vector< T >
 

Function Documentation

◆ operator+()

template<typename T >
auto operator+ ( const std::vector< T > &  v0,
const std::vector< T > &  v1 
) -> decltype(auto)

◆ operator+=()

template<typename T >
auto operator+= ( std::vector< T > &  v0,
const std::vector< T > &  v1 
) -> decltype(auto)

◆ operator<<() [1/5]

std::ostream& operator<< ( std::ostream &  os,
const geometry_msgs::msg::Point &  point 
)

◆ operator<<() [2/5]

std::ostream& operator<< ( std::ostream &  os,
const geometry_msgs::msg::Pose &  pose 
)

◆ operator<<() [3/5]

std::ostream& operator<< ( std::ostream &  os,
const geometry_msgs::msg::Quaternion &  quat 
)

◆ operator<<() [4/5]

std::ostream& operator<< ( std::ostream &  os,
const geometry_msgs::msg::Vector3 &  vector 
)

◆ operator<<() [5/5]

std::ostream& operator<< ( std::ostream &  os,
const traffic_simulator::LaneletPose ll_pose 
)

◆ sortAndUnique()

template<typename T >
auto sortAndUnique ( const std::vector< T > &  data) -> std::vector<T>