hiep sua ten file
This commit is contained in:
@@ -170,16 +170,16 @@ void StaticLayer::handleImpl(const void* data,
|
||||
const std::type_info& type,
|
||||
const std::string& topic)
|
||||
{
|
||||
if (type == typeid(nav_msgs::OccupancyGrid) && topic == "map") {
|
||||
incomingMap(*static_cast<const nav_msgs::OccupancyGrid*>(data));
|
||||
} else if (type == typeid(map_msgs::OccupancyGridUpdate) && topic == "map_update") {
|
||||
incomingUpdate(*static_cast<const map_msgs::OccupancyGridUpdate*>(data));
|
||||
if (type == typeid(robot_nav_msgs::OccupancyGrid) && topic == "map") {
|
||||
incomingMap(*static_cast<const robot_nav_msgs::OccupancyGrid*>(data));
|
||||
} else if (type == typeid(robot_map_msgs::OccupancyGridUpdate) && topic == "map_update") {
|
||||
incomingUpdate(*static_cast<const robot_map_msgs::OccupancyGridUpdate*>(data));
|
||||
} else {
|
||||
std::cout << "[Plugin] Unknown type: " << type.name() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void StaticLayer::incomingMap(const nav_msgs::OccupancyGrid& new_map)
|
||||
void StaticLayer::incomingMap(const robot_nav_msgs::OccupancyGrid& new_map)
|
||||
{
|
||||
if(!map_shutdown_)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ void StaticLayer::incomingMap(const nav_msgs::OccupancyGrid& new_map)
|
||||
}
|
||||
}
|
||||
|
||||
void StaticLayer::incomingUpdate(const map_msgs::OccupancyGridUpdate& update)
|
||||
void StaticLayer::incomingUpdate(const robot_map_msgs::OccupancyGridUpdate& update)
|
||||
{
|
||||
if(!map_update_shutdown_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user