unitreerobotics / unitree_ros

BSD 3-Clause "New" or "Revised" License
463 stars 224 forks source link

Compilation issues #87

Closed hanzhi0410 closed 5 months ago

hanzhi0410 commented 5 months ago

In ubuntu20.04 Hello, I have downloaded this program and Unitree Legged Msgs, install dependency sudo apt-get install ros noitic controller interface ros noitic Gazebo ros control ros noitic joint state controller ros noitic effort controllers ros noitic joint trajectory controller and modify the corresponding path to modify Unitree Gazebo/worlds/stairs. world file, and then I perform catkin During the make compilation process, the following issues were encountered 225 | ::google::protobuf::internal::InternalMetadataWithArena _internalmetadata; | ^~~~~~~~~ | InternalMetadata /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:121:23: error: ‘ignition::msgs::WorldModify ignition::msgs::WorldModify::New() const’ marked ‘final’, but is not virtual 121 | inline WorldModify New() const final { | ^~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:136:8: error: ‘bool ignition::msgs::WorldModify::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream)’ marked ‘final’, but is not virtual 136 | bool MergePartialFromCodedStream( | ^~~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:138:8: error: ‘void ignition::msgs::WorldModify::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const’ marked ‘final’, but is not virtual 138 | void SerializeWithCachedSizes( | ^~~~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:140:30: error: ‘google::protobuf::uint8 ignition::msgs::WorldModify::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8) const’ marked ‘final’, but is not virtual 140 | ::google::protobuf::uint8 InternalSerializeWithCachedSizesToArray( | ^~~~~~~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::clear_world_name()’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:296:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘ClearToEmptyNoArena’; did you mean ‘ClearToEmpty’? 296 | worldname.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); | ^~~~~~~ | ClearToEmpty /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘const string& ignition::msgs::WorldModify::world_name() const’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:300:22: error: ‘const struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘GetNoArena’ 300 | return worldname.GetNoArena(); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_world_name(const string&)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:304:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 304 | worldname.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_world_name(std::string&&)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:310:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 310 | worldname.SetNoArena( | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_world_name(const char)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:318:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 318 | worldname.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_world_name(const char, size_t)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:323:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 323 | worldname.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘std::string ignition::msgs::WorldModify::mutable_world_name()’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:330:22: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘MutableNoArena’ 330 | return worldname.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘std::string ignition::msgs::WorldModify::release_world_name()’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:335:22: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘ReleaseNoArena’ 335 | return worldname.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_allocated_world_name(std::string)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:343:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetAllocatedNoArena’; did you mean ‘SetAllocated’? 343 | worldname.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), world_name); | ^~~~~~~ | SetAllocated /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::clear_cloned_uri()’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:391:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘ClearToEmptyNoArena’; did you mean ‘ClearToEmpty’? 391 | cloneduri.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); | ^~~~~~~ | ClearToEmpty /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘const string& ignition::msgs::WorldModify::cloned_uri() const’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:395:22: error: ‘const struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘GetNoArena’ 395 | return cloneduri.GetNoArena(); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_cloned_uri(const string&)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:399:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 399 | cloneduri.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_cloned_uri(std::string&&)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:405:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 405 | cloneduri.SetNoArena( | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_cloned_uri(const char)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:413:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 413 | cloneduri.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_cloned_uri(const char, size_t)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:418:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’ 418 | cloneduri.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘std::string ignition::msgs::WorldModify::mutable_cloned_uri()’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:425:22: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘MutableNoArena’ 425 | return cloneduri.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘std::string ignition::msgs::WorldModify::release_cloned_uri()’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:430:22: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘ReleaseNoArena’ 430 | return cloneduri.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); | ^~~~~~ /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h: In member function ‘void ignition::msgs::WorldModify::set_allocated_cloned_uri(std::string*)’: /usr/include/ignition/msgs5/ignition/msgs/world_modify.pb.h:438:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetAllocatedNoArena’; did you mean ‘SetAllocated’? 438 | cloneduri.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), cloned_uri); | ^~~~~~~ | SetAllocated make[2]: [unitree_ros/unitree_gazebo/CMakeFiles/unitreeDrawForcePlugin.dir/build.make:76:unitree_ros/unitree_gazebo/CMakeFiles/unitreeDrawForcePlugin.dir/plugin/draw_force_plugin.cc.o] 错误 1 make[1]: [CMakeFiles/Makefile2:3419:unitree_ros/unitree_gazebo/CMakeFiles/unitreeDrawForcePlugin.dir/all] 错误 2 make: *** [Makefile:146:all] 错误 2 Invoking "make -j20 -l20" failed I suspect it's an issue with my protobuf version. Can you provide some assistance

abloomyt commented 2 months ago

Hello, I have the same problem as you, can I ask you how to solve it?