update to tf3
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
#include <iostream>
|
||||
#include <costmap_2d/costmap_layer.h>
|
||||
#include <costmap_2d/layered_costmap.h>
|
||||
#include <tf2/buffer_core.h>
|
||||
#include <tf2/time.h>
|
||||
#include <tf3/buffer_core.h>
|
||||
#include <tf3/time.h>
|
||||
#include "nav_msgs/OccupancyGrid.h"
|
||||
#include <map_msgs/OccupancyGridUpdate.h>
|
||||
#include <costmap_2d/obstacle_layer.h>
|
||||
@@ -35,7 +35,7 @@ int main(int argc, char* argv[]) {
|
||||
<< ", resolution: " << layered_costmap.getCostmap()->getResolution()
|
||||
<< "m/cell" << std::endl;
|
||||
|
||||
tf2::BufferCore tf_buffer;
|
||||
tf3::BufferCore tf_buffer;
|
||||
|
||||
// // ✅ FIX 2: Lưu tất cả plugins để tránh bị destroy
|
||||
// std::vector<costmap_2d::PluginLayerPtr> plugin_instances;
|
||||
@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) {
|
||||
// // << " m/cell" << std::endl;
|
||||
|
||||
// // // 2️⃣ TF buffer
|
||||
// // tf2::BufferCore tf_buffer;
|
||||
// // tf3::BufferCore tf_buffer;
|
||||
|
||||
// // // 3️⃣ Thiết lập footprint robot trước khi load inflation_layer
|
||||
// // std::vector<geometry_msgs::Point> footprint = {
|
||||
@@ -287,8 +287,8 @@ int main(int argc, char* argv[]) {
|
||||
// #include <iostream>
|
||||
// #include <costmap_2d/costmap_layer.h>
|
||||
// #include <costmap_2d/layered_costmap.h>
|
||||
// #include <tf2/buffer_core.h>
|
||||
// #include <tf2/time.h>
|
||||
// #include <tf3/buffer_core.h>
|
||||
// #include <tf3/time.h>
|
||||
// #include "nav_msgs/OccupancyGrid.h"
|
||||
// #include <map_msgs/OccupancyGridUpdate.h>
|
||||
// #include <costmap_2d/obstacle_layer.h>
|
||||
@@ -311,9 +311,9 @@ int main(int argc, char* argv[]) {
|
||||
// bool track_unknown = true;
|
||||
// LayeredCostmap layered_costmap(global_frame, rolling_window, track_unknown);
|
||||
|
||||
// tf2::BufferCore tf_buffer;
|
||||
// // tf2::Duration cache_time(10.0);
|
||||
// // tf2::BufferCore tf_buffer(cache_time);
|
||||
// tf3::BufferCore tf_buffer;
|
||||
// // tf3::Duration cache_time(10.0);
|
||||
// // tf3::BufferCore tf_buffer(cache_time);
|
||||
|
||||
// plugin->initialize(&layered_costmap, "static_layer", &tf_buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user