marinakollmitz / gazebo_ros_2dmap_plugin Goto Github PK
View Code? Open in Web Editor NEWGazebo simulator plugin to automatically generate a 2D occupancy map from the simulated world at a given height.
License: MIT License
Gazebo simulator plugin to automatically generate a 2D occupancy map from the simulated world at a given height.
License: MIT License
I see that currently a separate branch exists for (melodic + gazebo9) support while the mainline supports (kinetic + gazebo7). Is there a plan to support gazebo7 and gazebo9 within the same branch?
For reference, I have made the changes in a personal fork. It would be great if these changes could be merged upstream in the mainline or as a separate branch.
Hi,
I am using this package on ubuntu 16 with ROS kinetic.
Included the plugin as described right over the </world>
tag and ran the world file in gazebo as
$ gazebo myworld.world
I am getting the following errors:
[FATAL] [1571652019.569040996]: You must call ros::init() before creating the first NodeHandle
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
[ERROR] [1571652019.611353705]: [registerPublisher] Failed to contact master at [:0]. Retrying...
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
roscore is already running on another terminal. Not sure why the error is so. Can you help me.
Thanks
Hello,
I am trying to run this package in Ubuntu 20.04 running ROS Noetic and I am getting the following error
ERROR: service [/gazebo_2Dmap_plugin/generate_map] responded with an error: b'vector::_M_range_check: __n (which is 4275662) >= this->size() (which is 2940000)'
It can happen that occupied cells are "inside" objects, in unknown space. The robot would never observe these cells during mapping.
See title, setting map to anything not square causes really weird glitching in the created map.
If you set an expansion limit to something like a 100 cells, you'll notice that multiple "wave-fronts" seem to be created.
If (0,0,map_z) is part of an enclosed "obstacle" in the larger world, the output produces only the enclosed obstacle map ignoring the rest of the world.
Ideal solution would be to start the DFS search to cover multiple islands and stitch the maps together. As a quicker hack, user can provide the starting point for the robot in the DFS search via plugin args.
After the rosservice finishes mapping the world, it is automatically closed and no longer publishing to /map topic.
Making the node stream to a latched topic could enable running mapsaver aynchronously.
Hi,
I want to use this package on Ubuntu 18 with ROS melodic and gazebo version 9. After catkin_make I got the following error:
fatal error: gazebo/math/Vector3.hh: No such file or directory #include <gazebo/math/Vector3.hh>
which is explained here:
https://answers.gazebosim.org/question/21872/vector3hh-not-found-on-gazebo9/
So I changed math::Vector3 to ignition::math::Vector3
with the header #include <ignition/math/Vector3.hh>
but I still get some errors:
[ 0%] Built target gazebo_ros_2Dmap_plugin_xacro_generated_to_devel_space_ [ 50%] Building CXX object gazebo_ros_2Dmap_plugin/CMakeFiles/gazebo_2Dmap_plugin.dir/src/gazebo_2Dmap_plugin.cpp.o /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp: In member function ‘virtual void gazebo::OccupancyMapFromWorld::Load(gazebo::physics::WorldPtr, sdf::ElementPtr)’: /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:68:44: error: qualified-id in declaration before ‘(’ token bool OccupancyMapFromWorld::ServiceCallback(std_srvs::Empty::Request& req, ^ /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:75:50: error: qualified-id in declaration before ‘(’ token bool OccupancyMapFromWorld::worldCellIntersection(const ignition::math::Vector3& cell_center, ^ /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:124:39: error: qualified-id in declaration before ‘(’ token void OccupancyMapFromWorld::cell2world(unsigned int cell_x, unsigned int cell_y, ^ /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:133:39: error: qualified-id in declaration before ‘(’ token void OccupancyMapFromWorld::world2cell(double world_x, double world_y, ^ /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:142:39: error: qualified-id in declaration before ‘(’ token bool OccupancyMapFromWorld::cell2index(int cell_x, int cell_y, ^ /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:158:39: error: qualified-id in declaration before ‘(’ token bool OccupancyMapFromWorld::index2cell(int index, unsigned int cell_size_x, ^ /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:174:47: error: qualified-id in declaration before ‘(’ token void OccupancyMapFromWorld::CreateOccupancyMap() ^ In file included from /usr/include/gazebo-9/gazebo/common/common.hh:36:0, from /usr/include/gazebo-9/gazebo/gazebo_core.hh:19, from /usr/include/gazebo-9/gazebo/gazebo.hh:20, from /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/include/common.h:26, from /home/usermap_ws/src/gazebo_ros_2Dmap_plugin/include/gazebo_2Dmap_plugin.h:28, from /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:21: /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:283:1: error: expected unqualified-id before string constant GZ_REGISTER_WORLD_PLUGIN(OccupancyMapFromWorld) ^ /home/user/map_ws/src/gazebo_ros_2Dmap_plugin/src/gazebo_2Dmap_plugin.cpp:283:1: error: a function-definition is not allowed here before ‘{’ token GZ_REGISTER_WORLD_PLUGIN(OccupancyMapFromWorld) ^
any tip will be appreciated, thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.