17 #ifndef CARTOGRAPHER_ROS_NODE_H_ 18 #define CARTOGRAPHER_ROS_NODE_H_ 27 #include "cartographer_ros_msgs/FinishTrajectory.h" 28 #include "cartographer_ros_msgs/SensorTopics.h" 29 #include "cartographer_ros_msgs/StartTrajectory.h" 30 #include "cartographer_ros_msgs/SubmapEntry.h" 31 #include "cartographer_ros_msgs/SubmapList.h" 32 #include "cartographer_ros_msgs/SubmapQuery.h" 33 #include "cartographer_ros_msgs/TrajectoryOptions.h" 34 #include "cartographer_ros_msgs/TrajectorySubmapList.h" 35 #include "cartographer_ros_msgs/WriteAssets.h" 76 cartographer_ros_msgs::SubmapQuery::Request& request,
77 cartographer_ros_msgs::SubmapQuery::Response&
response);
79 cartographer_ros_msgs::StartTrajectory::Request& request,
80 cartographer_ros_msgs::StartTrajectory::Response& response);
82 cartographer_ros_msgs::FinishTrajectory::Request& request,
83 cartographer_ros_msgs::FinishTrajectory::Response& response);
85 cartographer_ros_msgs::WriteAssets::Request& request,
86 cartographer_ros_msgs::WriteAssets::Response& response);
88 const cartographer_ros_msgs::SensorTopics& topics);
90 const cartographer_ros_msgs::SensorTopics& topics,
114 cartographer::common::Time::min();
121 std::unordered_map<int, std::vector<::ros::Subscriber>>
123 std::unordered_map<int, bool> is_active_trajectory_
GUARDED_BY(mutex_);
135 #endif // CARTOGRAPHER_ROS_NODE_H_ Node & operator=(const Node &)=delete
::ros::Publisher trajectory_nodes_list_publisher_
std::vector<::ros::ServiceServer > service_servers_
void FinishAllTrajectories()
void PublishTrajectoryNodesList(const ::ros::WallTimerEvent &timer_event)
bool ValidateTopicName(const ::cartographer_ros_msgs::SensorTopics &topics, const TrajectoryOptions &options)
bool ValidateTrajectoryOptions(const TrajectoryOptions &options)
MapBuilderBridge * map_builder_bridge()
void PublishSubmapList(const ::ros::WallTimerEvent &timer_event)
constexpr char kFinishTrajectoryServiceName[]
std::thread occupancy_grid_thread_
constexpr char kImuTopic[]
cartographer::common::Mutex mutex_
const NodeOptions node_options_
constexpr char kTrajectoryNodesListTopic[]
constexpr char kLaserScanTopic[]
tf2_ros::TransformBroadcaster tf_broadcaster_
bool HandleStartTrajectory(cartographer_ros_msgs::StartTrajectory::Request &request, cartographer_ros_msgs::StartTrajectory::Response &response)
::ros::Publisher scan_matched_point_cloud_publisher_
UniversalTimeScaleClock::time_point Time
void SpinOccupancyGridThreadForever()
::ros::Publisher submap_list_publisher_
std::unordered_map< int,::ros::Subscriber > odom_subscribers_
::ros::NodeHandle node_handle_
std::vector<::ros::WallTimer > wall_timers_
int AddTrajectory(const TrajectoryOptions &options, const cartographer_ros_msgs::SensorTopics &topics)
constexpr char kScanMatchedPointCloudTopic[]
MapBuilderBridge map_builder_bridge_ GUARDED_BY(mutex_)
std::unordered_map< int,::ros::Subscriber > imu_subscribers_
constexpr char kStartTrajectoryServiceName[]
bool HandleWriteAssets(cartographer_ros_msgs::WriteAssets::Request &request, cartographer_ros_msgs::WriteAssets::Response &response)
std::unordered_map< int,::ros::Subscriber > laser_scan_subscribers_
constexpr char kOdometryTopic[]
cartographer::common::Time last_scan_matched_point_cloud_time_
::ros::NodeHandle * node_handle()
constexpr char kOccupancyGridTopic[]
bool HandleFinishTrajectory(cartographer_ros_msgs::FinishTrajectory::Request &request, cartographer_ros_msgs::FinishTrajectory::Response &response)
void StartTrajectoryWithDefaultTopics(const TrajectoryOptions &options)
constexpr char kWriteAssetsServiceName[]
constexpr char kMultiEchoLaserScanTopic[]
std::unordered_map< int, std::vector<::ros::Subscriber > > point_cloud_subscribers_
::ros::Publisher occupancy_grid_publisher_
constexpr char kSubmapQueryServiceName[]
Node(const NodeOptions &node_options, tf2_ros::Buffer *tf_buffer)
constexpr char kPointCloud2Topic[]
constexpr char kSubmapListTopic[]
std::unordered_map< int,::ros::Subscriber > multi_echo_laser_scan_subscribers_
bool HandleSubmapQuery(cartographer_ros_msgs::SubmapQuery::Request &request, cartographer_ros_msgs::SubmapQuery::Response &response)
void LaunchSubscribers(const TrajectoryOptions &options, const cartographer_ros_msgs::SensorTopics &topics, int trajectory_id)
tf2_ros::Buffer * tf_buffer
void PublishTrajectoryStates(const ::ros::WallTimerEvent &timer_event)
const std::string response