Home | Tutorials | Wiki | Issues
Ask Your Question
0

protobuf error for custom messages transport tutorial

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

tonylindsay gravatar image

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

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/descriptor_database.cc:57] File already exists in database: vector2d.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:1018] 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?

thanks

Tony

edit retag flag offensive close merge delete

Comments

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

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

I am facing the same problem. Please help

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

1 Answer

Sort by ยป oldest newest most voted
0

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

alienmon gravatar image

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

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
  collision_map_request.proto
  ${PROTOBUF_IMPORT_DIRS}/vector2d.proto
  ${PROTOBUF_IMPORT_DIRS}/header.proto
  ${PROTOBUF_IMPORT_DIRS}/time.proto
)

to

set (msgs
  collision_map_request.proto
)

Then remake again using cmake ../ and make

Open the map_creator.world 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/libcollision_map_creator.so" 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 libcollision_map_creator.so 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
Login/Signup to Answer

Question Tools

Stats

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

Seen: 875 times

Last updated: Dec 05