Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
cartographer_ros::Node Class Reference

#include <node.h>

Classes

struct  Subscriber
 
struct  TrajectorySensorSamplers
 

Public Member Functions

int AddOfflineTrajectory (const std::set< cartographer::mapping::TrajectoryBuilderInterface::SensorId > &expected_sensor_ids, const TrajectoryOptions &options)
 
std::vector< std::set<::cartographer::mapping::TrajectoryBuilderInterface::SensorId > > ComputeDefaultSensorIdsForMultipleBags (const std::vector< TrajectoryOptions > &bags_options) const
 
void FinishAllTrajectories ()
 
bool FinishTrajectory (int trajectory_id)
 
void HandleImuMessage (int trajectory_id, const std::string &sensor_id, const sensor_msgs::Imu::ConstPtr &msg)
 
void HandleLandmarkMessage (int trajectory_id, const std::string &sensor_id, const cartographer_ros_msgs::LandmarkList::ConstPtr &msg)
 
void HandleLaserScanMessage (int trajectory_id, const std::string &sensor_id, const sensor_msgs::LaserScan::ConstPtr &msg)
 
void HandleMultiEchoLaserScanMessage (int trajectory_id, const std::string &sensor_id, const sensor_msgs::MultiEchoLaserScan::ConstPtr &msg)
 
void HandleNavSatFixMessage (int trajectory_id, const std::string &sensor_id, const sensor_msgs::NavSatFix::ConstPtr &msg)
 
void HandleOdometryMessage (int trajectory_id, const std::string &sensor_id, const nav_msgs::Odometry::ConstPtr &msg)
 
void HandlePointCloud2Message (int trajectory_id, const std::string &sensor_id, const sensor_msgs::PointCloud2::ConstPtr &msg)
 
void LoadState (const std::string &state_filename, bool load_frozen_state)
 
 Node (const NodeOptions &node_options, std::unique_ptr< cartographer::mapping::MapBuilderInterface > map_builder, tf2_ros::Buffer *tf_buffer)
 
 Node (const Node &)=delete
 
::ros::NodeHandlenode_handle ()
 
Nodeoperator= (const Node &)=delete
 
void RunFinalOptimization ()
 
void SerializeState (const std::string &filename)
 
void StartTrajectoryWithDefaultTopics (const TrajectoryOptions &options)
 
 ~Node ()
 

Private Member Functions

void AddExtrapolator (int trajectory_id, const TrajectoryOptions &options)
 
void AddSensorSamplers (int trajectory_id, const TrajectoryOptions &options)
 
int AddTrajectory (const TrajectoryOptions &options, const cartographer_ros_msgs::SensorTopics &topics)
 
std::set<::cartographer::mapping::TrajectoryBuilderInterface::SensorIdComputeExpectedSensorIds (const TrajectoryOptions &options, const cartographer_ros_msgs::SensorTopics &topics) const
 
cartographer_ros_msgs::StatusResponse FinishTrajectoryUnderLock (int trajectory_id) REQUIRES(mutex_)
 
MapBuilderBridge map_builder_bridge_ GUARDED_BY (mutex_)
 
std::unordered_map< int, bool > is_active_trajectory_ GUARDED_BY (mutex_)
 
bool HandleFinishTrajectory (cartographer_ros_msgs::FinishTrajectory::Request &request, cartographer_ros_msgs::FinishTrajectory::Response &response)
 
bool HandleStartTrajectory (cartographer_ros_msgs::StartTrajectory::Request &request, cartographer_ros_msgs::StartTrajectory::Response &response)
 
bool HandleSubmapQuery (cartographer_ros_msgs::SubmapQuery::Request &request, cartographer_ros_msgs::SubmapQuery::Response &response)
 
bool HandleWriteState (cartographer_ros_msgs::WriteState::Request &request, cartographer_ros_msgs::WriteState::Response &response)
 
void LaunchSubscribers (const TrajectoryOptions &options, const cartographer_ros_msgs::SensorTopics &topics, int trajectory_id)
 
void PublishConstraintList (const ::ros::WallTimerEvent &timer_event)
 
void PublishLandmarkPosesList (const ::ros::WallTimerEvent &timer_event)
 
void PublishSubmapList (const ::ros::WallTimerEvent &timer_event)
 
void PublishTrajectoryNodeList (const ::ros::WallTimerEvent &timer_event)
 
void PublishTrajectoryStates (const ::ros::WallTimerEvent &timer_event)
 
void SpinOccupancyGridThreadForever ()
 
bool ValidateTopicNames (const ::cartographer_ros_msgs::SensorTopics &topics, const TrajectoryOptions &options)
 
bool ValidateTrajectoryOptions (const TrajectoryOptions &options)
 

Private Attributes

::ros::Publisher constraint_list_publisher_
 
std::map< int, ::cartographer::mapping::PoseExtrapolatorextrapolators_
 
::ros::Publisher landmark_poses_list_publisher_
 
cartographer::common::Mutex mutex_
 
::ros::NodeHandle node_handle_
 
const NodeOptions node_options_
 
::ros::Publisher scan_matched_point_cloud_publisher_
 
std::unordered_map< int, TrajectorySensorSamplerssensor_samplers_
 
std::vector<::ros::ServiceServerservice_servers_
 
::ros::Publisher submap_list_publisher_
 
std::unordered_set< std::string > subscribed_topics_
 
std::unordered_map< int, std::vector< Subscriber > > subscribers_
 
tf2_ros::TransformBroadcaster tf_broadcaster_
 
::ros::Publisher trajectory_node_list_publisher_
 
std::vector<::ros::WallTimerwall_timers_
 

Detailed Description

Definition at line 56 of file node.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

cartographer_ros::Node::Node ( const NodeOptions node_options,
std::unique_ptr< cartographer::mapping::MapBuilderInterface map_builder,
tf2_ros::Buffer tf_buffer 
)

Definition at line 85 of file node.cc.

◆ ~Node()

cartographer_ros::Node::~Node ( )

Definition at line 134 of file node.cc.

◆ Node() [2/2]

cartographer_ros::Node::Node ( const Node )
delete

Member Function Documentation

◆ AddExtrapolator()

void cartographer_ros::Node::AddExtrapolator ( int  trajectory_id,
const TrajectoryOptions options 
)
private

Definition at line 151 of file node.cc.

◆ AddOfflineTrajectory()

int cartographer_ros::Node::AddOfflineTrajectory ( const std::set< cartographer::mapping::TrajectoryBuilderInterface::SensorId > &  expected_sensor_ids,
const TrajectoryOptions options 
)

Definition at line 544 of file node.cc.

◆ AddSensorSamplers()

void cartographer_ros::Node::AddSensorSamplers ( int  trajectory_id,
const TrajectoryOptions options 
)
private

Definition at line 168 of file node.cc.

◆ AddTrajectory()

int cartographer_ros::Node::AddTrajectory ( const TrajectoryOptions options,
const cartographer_ros_msgs::SensorTopics &  topics 
)
private

Definition at line 335 of file node.cc.

◆ ComputeDefaultSensorIdsForMultipleBags()

std::vector< std::set< cartographer::mapping::TrajectoryBuilderInterface::SensorId > > cartographer_ros::Node::ComputeDefaultSensorIdsForMultipleBags ( const std::vector< TrajectoryOptions > &  bags_options) const

Definition at line 525 of file node.cc.

◆ ComputeExpectedSensorIds()

std::set< cartographer::mapping::TrajectoryBuilderInterface::SensorId > cartographer_ros::Node::ComputeExpectedSensorIds ( const TrajectoryOptions options,
const cartographer_ros_msgs::SensorTopics &  topics 
) const
private

Definition at line 290 of file node.cc.

◆ FinishAllTrajectories()

void cartographer_ros::Node::FinishAllTrajectories ( )

Definition at line 579 of file node.cc.

◆ FinishTrajectory()

bool cartographer_ros::Node::FinishTrajectory ( int  trajectory_id)

Definition at line 590 of file node.cc.

◆ FinishTrajectoryUnderLock()

cartographer_ros_msgs::StatusResponse cartographer_ros::Node::FinishTrajectoryUnderLock ( int  trajectory_id)
private

Definition at line 445 of file node.cc.

◆ GUARDED_BY() [1/2]

MapBuilderBridge map_builder_bridge_ cartographer_ros::Node::GUARDED_BY ( mutex_  )
private

◆ GUARDED_BY() [2/2]

std::unordered_map<int, bool> is_active_trajectory_ cartographer_ros::Node::GUARDED_BY ( mutex_  )
private

◆ HandleFinishTrajectory()

bool cartographer_ros::Node::HandleFinishTrajectory ( cartographer_ros_msgs::FinishTrajectory::Request &  request,
cartographer_ros_msgs::FinishTrajectory::Response &  response 
)
private

Definition at line 557 of file node.cc.

◆ HandleImuMessage()

void cartographer_ros::Node::HandleImuMessage ( int  trajectory_id,
const std::string &  sensor_id,
const sensor_msgs::Imu::ConstPtr &  msg 
)

Definition at line 645 of file node.cc.

◆ HandleLandmarkMessage()

void cartographer_ros::Node::HandleLandmarkMessage ( int  trajectory_id,
const std::string &  sensor_id,
const cartographer_ros_msgs::LandmarkList::ConstPtr &  msg 
)

Definition at line 634 of file node.cc.

◆ HandleLaserScanMessage()

void cartographer_ros::Node::HandleLaserScanMessage ( int  trajectory_id,
const std::string &  sensor_id,
const sensor_msgs::LaserScan::ConstPtr &  msg 
)

Definition at line 660 of file node.cc.

◆ HandleMultiEchoLaserScanMessage()

void cartographer_ros::Node::HandleMultiEchoLaserScanMessage ( int  trajectory_id,
const std::string &  sensor_id,
const sensor_msgs::MultiEchoLaserScan::ConstPtr &  msg 
)

Definition at line 671 of file node.cc.

◆ HandleNavSatFixMessage()

void cartographer_ros::Node::HandleNavSatFixMessage ( int  trajectory_id,
const std::string &  sensor_id,
const sensor_msgs::NavSatFix::ConstPtr &  msg 
)

Definition at line 623 of file node.cc.

◆ HandleOdometryMessage()

void cartographer_ros::Node::HandleOdometryMessage ( int  trajectory_id,
const std::string &  sensor_id,
const nav_msgs::Odometry::ConstPtr &  msg 
)

Definition at line 608 of file node.cc.

◆ HandlePointCloud2Message()

void cartographer_ros::Node::HandlePointCloud2Message ( int  trajectory_id,
const std::string &  sensor_id,
const sensor_msgs::PointCloud2::ConstPtr &  msg 
)

Definition at line 682 of file node.cc.

◆ HandleStartTrajectory()

bool cartographer_ros::Node::HandleStartTrajectory ( cartographer_ros_msgs::StartTrajectory::Request &  request,
cartographer_ros_msgs::StartTrajectory::Response &  response 
)
private

Definition at line 493 of file node.cc.

◆ HandleSubmapQuery()

bool cartographer_ros::Node::HandleSubmapQuery ( cartographer_ros_msgs::SubmapQuery::Request &  request,
cartographer_ros_msgs::SubmapQuery::Response &  response 
)
private

Definition at line 138 of file node.cc.

◆ HandleWriteState()

bool cartographer_ros::Node::HandleWriteState ( cartographer_ros_msgs::WriteState::Request &  request,
cartographer_ros_msgs::WriteState::Response &  response 
)
private

Definition at line 565 of file node.cc.

◆ LaunchSubscribers()

void cartographer_ros::Node::LaunchSubscribers ( const TrajectoryOptions options,
const cartographer_ros_msgs::SensorTopics &  topics,
int  trajectory_id 
)
private

Definition at line 351 of file node.cc.

◆ LoadState()

void cartographer_ros::Node::LoadState ( const std::string &  state_filename,
bool  load_frozen_state 
)

Definition at line 699 of file node.cc.

◆ node_handle()

ros::NodeHandle * cartographer_ros::Node::node_handle ( )

Definition at line 136 of file node.cc.

◆ operator=()

Node& cartographer_ros::Node::operator= ( const Node )
delete

◆ PublishConstraintList()

void cartographer_ros::Node::PublishConstraintList ( const ::ros::WallTimerEvent timer_event)
private

Definition at line 281 of file node.cc.

◆ PublishLandmarkPosesList()

void cartographer_ros::Node::PublishLandmarkPosesList ( const ::ros::WallTimerEvent timer_event)
private

Definition at line 272 of file node.cc.

◆ PublishSubmapList()

void cartographer_ros::Node::PublishSubmapList ( const ::ros::WallTimerEvent timer_event)
private

Definition at line 146 of file node.cc.

◆ PublishTrajectoryNodeList()

void cartographer_ros::Node::PublishTrajectoryNodeList ( const ::ros::WallTimerEvent timer_event)
private

Definition at line 263 of file node.cc.

◆ PublishTrajectoryStates()

void cartographer_ros::Node::PublishTrajectoryStates ( const ::ros::WallTimerEvent timer_event)
private

Definition at line 179 of file node.cc.

◆ RunFinalOptimization()

void cartographer_ros::Node::RunFinalOptimization ( )

Definition at line 596 of file node.cc.

◆ SerializeState()

void cartographer_ros::Node::SerializeState ( const std::string &  filename)

Definition at line 693 of file node.cc.

◆ SpinOccupancyGridThreadForever()

void cartographer_ros::Node::SpinOccupancyGridThreadForever ( )
private

◆ StartTrajectoryWithDefaultTopics()

void cartographer_ros::Node::StartTrajectoryWithDefaultTopics ( const TrajectoryOptions options)

Definition at line 517 of file node.cc.

◆ ValidateTopicNames()

bool cartographer_ros::Node::ValidateTopicNames ( const ::cartographer_ros_msgs::SensorTopics &  topics,
const TrajectoryOptions options 
)
private

Definition at line 432 of file node.cc.

◆ ValidateTrajectoryOptions()

bool cartographer_ros::Node::ValidateTrajectoryOptions ( const TrajectoryOptions options)
private

Definition at line 420 of file node.cc.

Member Data Documentation

◆ constraint_list_publisher_

::ros::Publisher cartographer_ros::Node::constraint_list_publisher_
private

Definition at line 177 of file node.h.

◆ extrapolators_

std::map<int, ::cartographer::mapping::PoseExtrapolator> cartographer_ros::Node::extrapolators_
private

Definition at line 202 of file node.h.

◆ landmark_poses_list_publisher_

::ros::Publisher cartographer_ros::Node::landmark_poses_list_publisher_
private

Definition at line 176 of file node.h.

◆ mutex_

cartographer::common::Mutex cartographer_ros::Node::mutex_
private

Definition at line 170 of file node.h.

◆ node_handle_

::ros::NodeHandle cartographer_ros::Node::node_handle_
private

Definition at line 173 of file node.h.

◆ node_options_

const NodeOptions cartographer_ros::Node::node_options_
private

Definition at line 166 of file node.h.

◆ scan_matched_point_cloud_publisher_

::ros::Publisher cartographer_ros::Node::scan_matched_point_cloud_publisher_
private

Definition at line 180 of file node.h.

◆ sensor_samplers_

std::unordered_map<int, TrajectorySensorSamplers> cartographer_ros::Node::sensor_samplers_
private

Definition at line 203 of file node.h.

◆ service_servers_

std::vector<::ros::ServiceServer> cartographer_ros::Node::service_servers_
private

Definition at line 179 of file node.h.

◆ submap_list_publisher_

::ros::Publisher cartographer_ros::Node::submap_list_publisher_
private

Definition at line 174 of file node.h.

◆ subscribed_topics_

std::unordered_set<std::string> cartographer_ros::Node::subscribed_topics_
private

Definition at line 205 of file node.h.

◆ subscribers_

std::unordered_map<int, std::vector<Subscriber> > cartographer_ros::Node::subscribers_
private

Definition at line 204 of file node.h.

◆ tf_broadcaster_

tf2_ros::TransformBroadcaster cartographer_ros::Node::tf_broadcaster_
private

Definition at line 168 of file node.h.

◆ trajectory_node_list_publisher_

::ros::Publisher cartographer_ros::Node::trajectory_node_list_publisher_
private

Definition at line 175 of file node.h.

◆ wall_timers_

std::vector<::ros::WallTimer> cartographer_ros::Node::wall_timers_
private

Definition at line 210 of file node.h.


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


cartographer_ros
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:06:05