Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for compiling with Gazebo 7.0 in ROS Melodic #6

Merged
merged 9 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Create pgm map from Gazebo world file for ROS localization

## Environment
Tested on Ubuntu 16.04, ROS Kinetic, Boost 1.58, [Protocol Buffers v2.6.1](https://github.com/protocolbuffers/protobuf/releases/tag/v2.6.1)
Tested on Ubuntu 18.04, ROS Melodic, Boost 1.65

Install Protocol Buffers v2.6.1
- Download the zip file
Expand Down
3,003 changes: 3,003 additions & 0 deletions maps/example_map.pgm

Large diffs are not rendered by default.

3,090 changes: 1,545 additions & 1,545 deletions maps/map.pgm

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ endforeach()

set (msgs
collision_map_request.proto
${PROTOBUF_IMPORT_DIRS}/vector2d.proto
${PROTOBUF_IMPORT_DIRS}/header.proto
${PROTOBUF_IMPORT_DIRS}/time.proto
#${PROTOBUF_IMPORT_DIRS}/vector2d.proto
#${PROTOBUF_IMPORT_DIRS}/header.proto
#${PROTOBUF_IMPORT_DIRS}/time.proto
)
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${msgs})
add_library(collision_map_creator_msgs SHARED ${PROTO_SRCS})
Expand Down
7 changes: 5 additions & 2 deletions src/collision_map_creator.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#define png_infopp_NULL (png_infopp)NULL
#define int_p_NULL (int*)NULL

#include <fstream>
#include <iostream>
#include <math.h>
Expand Down Expand Up @@ -32,7 +35,7 @@ class CollisionMapCreator : public WorldPlugin
node = transport::NodePtr(new transport::Node());
world = _parent;
// Initialize the node with the world name
node->Init(world->Name());
node->Init(world->GetName());
std::cout << "Subscribing to: " << "~/collision_map/command" << std::endl;
commandSubscriber = node->Subscribe("~/collision_map/command",
&CollisionMapCreator::create, this);
Expand Down Expand Up @@ -88,7 +91,7 @@ class CollisionMapCreator : public WorldPlugin
start.Z(msg->height());
end.Z(0.001);

gazebo::physics::PhysicsEnginePtr engine = world->Physics();
gazebo::physics::PhysicsEnginePtr engine = world->GetPhysicsEngine();
engine->InitForThread();
gazebo::physics::RayShapePtr ray =
boost::dynamic_pointer_cast<gazebo::physics::RayShape>(
Expand Down
Loading
Loading