Gazebo | Ignition | Community
Ask Your Question

protobuf error for custom messages transport tutorial

asked 2015-06-15 06:21:36 -0500

tonylindsay gravatar image

updated 2017-12-05 19:58:34 -0500

chapulina gravatar image

I am new to the gazebo software and was working through the transport/custom messages tutorial. I have been able to get the main section of the code working si uit displays the world map. However, when I try to execute the request_publisher code it gives me this error:

[libprotobuf ERROR google/protobuf/] File already exists in database: vector2d.proto
[libprotobuf FATAL google/protobuf/] CHECK failed: generated_database_->Add(encoded_file_descriptor, size): 
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  CHECK failed: generated_database_->Add(encoded_file_descriptor, size): 
Aborted (core dumped)

How can I resolve this?



edit retag flag offensive close merge delete


Did you find a solution to this? I'm having the same issue.

GlenH gravatar imageGlenH ( 2016-12-22 10:49:17 -0500 )edit

I am facing the same problem. Please help

alienmon gravatar imagealienmon ( 2017-08-19 02:02:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2021-03-04 09:27:27 -0500

peci1 gravatar image

I also faced this issue recently. In my case, I was trying to load an SDF generated for Ignition Gazebo in Gazebo Classic. The SDF contained some plugins, and as the plugins were built for Ignition Gazebo, they pulled in different versions of ign-msgs and sdformat than Gazebo Classic uses. This mismatch then lead to the mentioned error and a segfault. To fix it, it's enough to remove the incompatible plugins from the SDF. I assume the same would happen if you'd load a Gazebo Classic SDF in Ignition Gazebo.

edit flag offensive delete link more

answered 2017-08-19 02:57:29 -0500

alienmon gravatar image

updated 2017-08-19 02:58:19 -0500

I faced the same problem and finally was able to get it run. Here's how I fixed it:

In the CMakeLists.txt under msgs folder, CHANGE the following code

set (msgs


set (msgs

Then remake again using cmake ../ and make

Open the file. Under the plugin_filename tag, make sure you specify the absolute path to the library so gazebo knows how to find it, unless the lib is at the same directory with the world. For example, in my case:

<plugin filename="/home/mon/GAZEBO Tutorial/collision_map_creator_plugin/build/" name="collision_map_creator"/>

Run the gazebo in --verbose mode, just to make sure no error occurs. Note: Initially, when I ran in verbose mode , it gave me error because the filename specified is just but my lib is not at the same dir as my world file, which is as instructed in the tutorial.

Lastly, don't forget to export the environment variable as suggested in the tutorial

export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:collision_map_creator_plugin/build

That works for me

edit flag offensive delete link more


Yes it works. But I am stuck at "Completed calculations, writing to image". How long does it take to write the image?

CR7 gravatar imageCR7 ( 2020-05-31 05:28:39 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2015-06-15 06:21:36 -0500

Seen: 3,951 times

Last updated: Mar 04 '21