Ros端消息格式
cartographer_ros/cartographer_ros_msgs/msg/TrajectoryOptions.msg
添加 bool is_in_slam_mode
在Ros端的cartographer_ros/cartographer_ros/trajectory_options.h
里面添加
struct TrajectoryOptions
{
//难道这个指向C++
::cartographer::mapping::proto::TrajectoryBuilderOptions trajectory_builder_options;
……………………
bool is_in_slam_mode;//
参数传递却没有传递过去,因为在 时候传递的是 trajectory_builder_options 这个成员
int trajectory_id =
map_builder_->AddTrajectoryBuilder( expected_sensor_ids, trajectory_options.trajectory_builder_options,
::std::bind(&MapB…………………………….
参数添加是通过C++端添加的
C++端消息格式
在C++的proto里面添加参数
/cartographer/mapping/proto/trajectory_builder_options.proto
添加 bool is_in_slam_mode = 5;
出现编译错误,所以要取一个其他的数字
设定 bool is_in_slam_mode = 6;
编译正确
message TrajectoryBuilderOptions {
LocalTrajectoryBuilderOptions2D trajectory_builder_2d_options = 1;
LocalTrajectoryBuilderOptions3D trajectory_builder_3d_options = 2;
bool pure_localization = 3;
InitialTrajectoryPose initial_trajectory_pose = 4;
bool is_in_slam_mode = 6;
message OverlappingSubmapsTrimmerOptions2D {
int32 fresh_submaps_count = 1;
double min_covered_area = 2;
int32 min_added_submaps_count = 3;
}
OverlappingSubmapsTrimmerOptions2D overlapping_submaps_trimmer_2d = 5;
}
在cmake之后,会生成到trajectory_builder.lua 文件
include “trajectory_builder_2d.lua”
include “trajectory_builder_3d.lua”
TRAJECTORY_BUILDER = {
trajectory_builder_2d = TRAJECTORY_BUILDER_2D,
trajectory_builder_3d = TRAJECTORY_BUILDER_3D,
pure_localization = false,
is_in_slam_mode = true,
}
make之后生成trajectory_builder_options.pb.cc 一些列文件,编译安装到linux系统中
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
相关推荐: hdu 4282 A very hard mathematic problem(二分+枚举)
A very hard mathematic problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submissio…