CARLA
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Private 成员函数 | Private 属性 | 静态 Private 属性 | 所有成员列表
carla::ros2::ROS2类 参考

#include <ROS2.h>

+ carla::ros2::ROS2 的协作图:

Public 成员函数

void AddActorCallback (void *actor, std::string ros_name, ActorCallback callback)
 
void AddActorParentRosName (void *actor, void *parent)
 
void AddActorRosName (void *actor, std::string ros_name)
 
void Enable (bool enable)
 
void EnableStream (carla::streaming::detail::stream_id_type id)
 
std::string GetActorParentRosName (void *actor)
 
std::string GetActorRosName (void *actor)
 
bool IsEnabled ()
 
bool IsStreamEnabled (carla::streaming::detail::stream_id_type id)
 
void ProcessDataFromCamera (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, int W, int H, float Fov, const carla::SharedBufferView buffer, void *actor=nullptr)
 
void ProcessDataFromCollisionSensor (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, uint32_t other_actor, carla::geom::Vector3D impulse, void *actor)
 
void ProcessDataFromDVS (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, const carla::SharedBufferView buffer, int W, int H, float Fov, void *actor=nullptr)
 
void ProcessDataFromGNSS (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, const carla::geom::GeoLocation &data, void *actor=nullptr)
 
void ProcessDataFromIMU (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, carla::geom::Vector3D accelerometer, carla::geom::Vector3D gyroscope, float compass, void *actor=nullptr)
 
void ProcessDataFromLidar (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, carla::sensor::data::LidarData &data, void *actor=nullptr)
 
void ProcessDataFromObstacleDetection (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, AActor *first_actor, AActor *second_actor, float distance, void *actor=nullptr)
 
void ProcessDataFromRadar (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, const carla::sensor::data::RadarData &data, void *actor=nullptr)
 
void ProcessDataFromSemanticLidar (uint64_t sensor_type, carla::streaming::detail::stream_id_type stream_id, const carla::geom::Transform sensor_transform, carla::sensor::data::SemanticLidarData &data, void *actor=nullptr)
 
void RemoveActorCallback (void *actor)
 
void RemoveActorRosName (void *actor)
 
void ResetStreams ()
 
 ROS2 (const ROS2 &obj)=delete
 
void SetFrame (uint64_t frame)
 
void SetTimestamp (double timestamp)
 
void Shutdown ()
 
void UpdateActorRosName (void *actor, std::string ros_name)
 

静态 Public 成员函数

static std::shared_ptr< ROS2GetInstance ()
 

Private 成员函数

std::pair< std::shared_ptr< CarlaPublisher >, std::shared_ptr< CarlaTransformPublisher > > GetOrCreateSensor (int type, carla::streaming::detail::stream_id_type id, void *actor)
 
 ROS2 ()
 

Private 属性

std::unordered_map< void *, ActorCallback_actor_callbacks
 
std::unordered_map< void *, std::vector< void * > > _actor_parent_ros_name
 
std::unordered_map< void *, std::string > _actor_ros_name
 
std::shared_ptr< CarlaClockPublisher_clock_publisher
 
std::shared_ptr< CarlaEgoVehicleControlSubscriber_controller
 
bool _enabled { false }
 
uint64_t _frame { 0 }
 
uint32_t _nanoseconds { 0 }
 
std::unordered_set< carla::streaming::detail::stream_id_type_publish_stream
 
std::unordered_map< void *, std::shared_ptr< CarlaPublisher > > _publishers
 
int32_t _seconds { 0 }
 
std::unordered_map< void *, std::shared_ptr< CarlaTransformPublisher > > _transforms
 

静态 Private 属性

static std::shared_ptr< ROS2_instance
 

详细描述

在文件 ROS2.h45 行定义.

构造及析构函数说明

◆ ROS2() [1/2]

carla::ros2::ROS2::ROS2 ( const ROS2 & obj)
delete

◆ ROS2() [2/2]

carla::ros2::ROS2::ROS2 ( )
inlineprivate

在文件 ROS2.h148 行定义.

成员函数说明

◆ AddActorCallback()

void carla::ros2::ROS2::AddActorCallback ( void * actor,
std::string ros_name,
ActorCallback callback )

在文件 ROS2.cpp174 行定义.

引用了 _actor_callbacks , 以及 _controller.

◆ AddActorParentRosName()

void carla::ros2::ROS2::AddActorParentRosName ( void * actor,
void * parent )

在文件 ROS2.cpp114 行定义.

引用了 _actor_parent_ros_name.

◆ AddActorRosName()

void carla::ros2::ROS2::AddActorRosName ( void * actor,
std::string ros_name )

在文件 ROS2.cpp110 行定义.

引用了 _actor_ros_name.

◆ Enable()

void carla::ros2::ROS2::Enable ( bool enable)

在文件 ROS2.cpp73 行定义.

引用了 _clock_publisher, _enabled , 以及 carla::log_info().

+ 函数调用图:

◆ EnableStream()

void carla::ros2::ROS2::EnableStream ( carla::streaming::detail::stream_id_type id)
inline

在文件 ROS2.h77 行定义.

引用了 _publish_stream.

◆ GetActorParentRosName()

std::string carla::ros2::ROS2::GetActorParentRosName ( void * actor)

在文件 ROS2.cpp147 行定义.

引用了 _actor_parent_ros_name , 以及 GetActorRosName().

被这些函数引用 GetOrCreateSensor().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ GetActorRosName()

std::string carla::ros2::ROS2::GetActorRosName ( void * actor)

在文件 ROS2.cpp138 行定义.

引用了 _actor_ros_name.

被这些函数引用 GetActorParentRosName() , 以及 GetOrCreateSensor().

+ 这是这个函数的调用关系图:

◆ GetInstance()

static std::shared_ptr< ROS2 > carla::ros2::ROS2::GetInstance ( )
inlinestatic

◆ GetOrCreateSensor()

std::pair< std::shared_ptr< CarlaPublisher >, std::shared_ptr< CarlaTransformPublisher > > carla::ros2::ROS2::GetOrCreateSensor ( int type,
carla::streaming::detail::stream_id_type id,
void * actor )
private

◆ IsEnabled()

bool carla::ros2::ROS2::IsEnabled ( )
inline

在文件 ROS2.h60 行定义.

引用了 _enabled.

◆ IsStreamEnabled()

bool carla::ros2::ROS2::IsStreamEnabled ( carla::streaming::detail::stream_id_type id)
inline

在文件 ROS2.h78 行定义.

引用了 _publish_stream.

◆ ProcessDataFromCamera()

void carla::ros2::ROS2::ProcessDataFromCamera ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
int W,
int H,
float Fov,
const carla::SharedBufferView buffer,
void * actor = nullptr )

◆ ProcessDataFromCollisionSensor()

void carla::ros2::ROS2::ProcessDataFromCollisionSensor ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
uint32_t other_actor,
carla::geom::Vector3D impulse,
void * actor )

在文件 ROS2.cpp814 行定义.

引用了 _nanoseconds, _seconds, carla::ros2::CollisionSensor, GetOrCreateSensor(), carla::geom::Transform::location, carla::geom::Transform::rotation, carla::geom::Vector3D::x, carla::geom::Vector3D::y , 以及 carla::geom::Vector3D::z.

+ 函数调用图:

◆ ProcessDataFromDVS()

void carla::ros2::ROS2::ProcessDataFromDVS ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
const carla::SharedBufferView buffer,
int W,
int H,
float Fov,
void * actor = nullptr )

◆ ProcessDataFromGNSS()

void carla::ros2::ROS2::ProcessDataFromGNSS ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
const carla::geom::GeoLocation & data,
void * actor = nullptr )

在文件 ROS2.cpp663 行定义.

引用了 _frame, _nanoseconds, _seconds, carla::geom::GeoLocation::altitude, GetOrCreateSensor(), carla::ros2::GnssSensor, carla::geom::GeoLocation::latitude, carla::geom::Transform::location, carla::log_info(), carla::geom::GeoLocation::longitude , 以及 carla::geom::Transform::rotation.

+ 函数调用图:

◆ ProcessDataFromIMU()

void carla::ros2::ROS2::ProcessDataFromIMU ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
carla::geom::Vector3D accelerometer,
carla::geom::Vector3D gyroscope,
float compass,
void * actor = nullptr )

在文件 ROS2.cpp683 行定义.

引用了 _frame, _nanoseconds, _seconds, GetOrCreateSensor(), carla::ros2::InertialMeasurementUnit, carla::geom::Transform::location, carla::log_info(), carla::geom::Transform::rotation , 以及 carla::geom::Vector3D::x.

+ 函数调用图:

◆ ProcessDataFromLidar()

void carla::ros2::ROS2::ProcessDataFromLidar ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
carla::sensor::data::LidarData & data,
void * actor = nullptr )

在文件 ROS2.cpp735 行定义.

引用了 _frame, _nanoseconds, carla::sensor::data::LidarData::_points, _seconds, GetOrCreateSensor(), carla::geom::Transform::location, carla::log_info(), carla::ros2::RayCastLidar , 以及 carla::geom::Transform::rotation.

+ 函数调用图:

◆ ProcessDataFromObstacleDetection()

void carla::ros2::ROS2::ProcessDataFromObstacleDetection ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
AActor * first_actor,
AActor * second_actor,
float distance,
void * actor = nullptr )

在文件 ROS2.cpp803 行定义.

引用了 _frame , 以及 carla::log_info().

+ 函数调用图:

◆ ProcessDataFromRadar()

void carla::ros2::ROS2::ProcessDataFromRadar ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
const carla::sensor::data::RadarData & data,
void * actor = nullptr )

在文件 ROS2.cpp780 行定义.

引用了 carla::sensor::data::RadarData::_detections, _frame, _nanoseconds, _seconds, carla::sensor::data::RadarData::GetDetectionCount(), GetOrCreateSensor(), carla::geom::Transform::location, carla::log_info(), carla::ros2::Radar , 以及 carla::geom::Transform::rotation.

+ 函数调用图:

◆ ProcessDataFromSemanticLidar()

void carla::ros2::ROS2::ProcessDataFromSemanticLidar ( uint64_t sensor_type,
carla::streaming::detail::stream_id_type stream_id,
const carla::geom::Transform sensor_transform,
carla::sensor::data::SemanticLidarData & data,
void * actor = nullptr )

在文件 ROS2.cpp757 行定义.

引用了 _frame, _nanoseconds, _seconds, carla::sensor::data::SemanticLidarData::_ser_points, GetOrCreateSensor(), carla::geom::Transform::location, carla::log_info(), carla::ros2::RayCastSemanticLidar , 以及 carla::geom::Transform::rotation.

+ 函数调用图:

◆ RemoveActorCallback()

void carla::ros2::ROS2::RemoveActorCallback ( void * actor)

在文件 ROS2.cpp182 行定义.

引用了 _actor_callbacks , 以及 _controller.

被这些函数引用 SetFrame().

+ 这是这个函数的调用关系图:

◆ RemoveActorRosName()

void carla::ros2::ROS2::RemoveActorRosName ( void * actor)

在文件 ROS2.cpp123 行定义.

引用了 _actor_parent_ros_name, _actor_ros_name, _publishers , 以及 _transforms.

◆ ResetStreams()

void carla::ros2::ROS2::ResetStreams ( )
inline

在文件 ROS2.h79 行定义.

引用了 _publish_stream.

◆ SetFrame()

void carla::ros2::ROS2::SetFrame ( uint64_t frame)

在文件 ROS2.cpp80 行定义.

引用了 _actor_callbacks, _controller, _frame , 以及 RemoveActorCallback().

+ 函数调用图:

◆ SetTimestamp()

void carla::ros2::ROS2::SetTimestamp ( double timestamp)

在文件 ROS2.cpp99 行定义.

引用了 _clock_publisher, _nanoseconds , 以及 _seconds.

◆ Shutdown()

void carla::ros2::ROS2::Shutdown ( )

在文件 ROS2.cpp834 行定义.

引用了 _clock_publisher, _controller, _enabled, _publishers , 以及 _transforms.

◆ UpdateActorRosName()

void carla::ros2::ROS2::UpdateActorRosName ( void * actor,
std::string ros_name )

在文件 ROS2.cpp131 行定义.

引用了 _actor_ros_name.

被这些函数引用 GetOrCreateSensor().

+ 这是这个函数的调用关系图:

类成员变量说明

◆ _actor_callbacks

std::unordered_map<void *, ActorCallback> carla::ros2::ROS2::_actor_callbacks
private

在文件 ROS2.h163 行定义.

被这些函数引用 AddActorCallback(), RemoveActorCallback() , 以及 SetFrame().

◆ _actor_parent_ros_name

std::unordered_map<void *, std::vector<void*> > carla::ros2::ROS2::_actor_parent_ros_name
private

在文件 ROS2.h157 行定义.

被这些函数引用 AddActorParentRosName(), GetActorParentRosName() , 以及 RemoveActorRosName().

◆ _actor_ros_name

std::unordered_map<void *, std::string> carla::ros2::ROS2::_actor_ros_name
private

在文件 ROS2.h156 行定义.

被这些函数引用 AddActorRosName(), GetActorRosName(), RemoveActorRosName() , 以及 UpdateActorRosName().

◆ _clock_publisher

std::shared_ptr<CarlaClockPublisher> carla::ros2::ROS2::_clock_publisher
private

在文件 ROS2.h159 行定义.

被这些函数引用 Enable(), SetTimestamp() , 以及 Shutdown().

◆ _controller

std::shared_ptr<CarlaEgoVehicleControlSubscriber> carla::ros2::ROS2::_controller
private

在文件 ROS2.h158 行定义.

被这些函数引用 AddActorCallback(), RemoveActorCallback(), SetFrame() , 以及 Shutdown().

◆ _enabled

bool carla::ros2::ROS2::_enabled { false }
private

在文件 ROS2.h152 行定义.

被这些函数引用 Enable(), IsEnabled() , 以及 Shutdown().

◆ _frame

uint64_t carla::ros2::ROS2::_frame { 0 }
private

◆ _instance

std::shared_ptr< ROS2 > carla::ros2::ROS2::_instance
staticprivate

在文件 ROS2.h150 行定义.

被这些函数引用 GetInstance().

◆ _nanoseconds

uint32_t carla::ros2::ROS2::_nanoseconds { 0 }
private

◆ _publish_stream

std::unordered_set<carla::streaming::detail::stream_id_type> carla::ros2::ROS2::_publish_stream
private

在文件 ROS2.h162 行定义.

被这些函数引用 EnableStream(), IsStreamEnabled() , 以及 ResetStreams().

◆ _publishers

std::unordered_map<void *, std::shared_ptr<CarlaPublisher> > carla::ros2::ROS2::_publishers
private

在文件 ROS2.h160 行定义.

被这些函数引用 GetOrCreateSensor(), RemoveActorRosName() , 以及 Shutdown().

◆ _seconds

int32_t carla::ros2::ROS2::_seconds { 0 }
private

◆ _transforms

std::unordered_map<void *, std::shared_ptr<CarlaTransformPublisher> > carla::ros2::ROS2::_transforms
private

在文件 ROS2.h161 行定义.

被这些函数引用 GetOrCreateSensor(), RemoveActorRosName() , 以及 Shutdown().


该类的文档由以下文件生成: