Open xabierolaz opened 3 years ago
Hi @wil3, changed most of things as you requested, Just some few minor things, as this
msgs/Distance.proto, line 8 at r1 (raw file): { required float ground_distance = 1; required int64 time_usec = 2; // about this line not being needed (as you say, State.proto in gymfc has the sim time) I have updated and pulled again with all the changes. if I remove it, then we get one compilation error:
cuda@cuda:~/workspace/aircraft-plugins-new/build$ cmake ..
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- thread
-- timer
-- chrono
-- date_time
-- atomic
-- Found DART: /usr/local/include (Required is at least version "6.6") found components: dart
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- thread
-- system
-- filesystem
-- program_options
-- regex
-- iostreams
-- date_time
-- chrono
-- atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0")
-- Boost version: 1.65.1
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found suitable version "3.0.0", minimum required is "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.2.5
-- Checking for module 'uuid'
-- Found uuid, version 2.31.1
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 6.0.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
-- Found gts, version 0.7.6
-- Checking for module 'libswscale'
-- Found libswscale, version 4.8.100
-- Checking for module 'libavdevice >= 56.4.100'
-- Found libavdevice , version 57.10.100
-- Checking for module 'libavformat'
-- Found libavformat, version 57.83.100
-- Checking for module 'libavcodec'
-- Found libavcodec, version 57.107.100
-- Checking for module 'libavutil'
-- Found libavutil, version 55.78.100
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.7.4
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.1.7
-- Checking for module 'libzip'
-- Found libzip, version 1.1.2
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread;-lpthread (found version "3.0.0")
Gazebo version: 10.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cuda/workspace/aircraft-plugins-new/build
cuda@cuda:~/workspace/aircraft-plugins-new/build$ make
[ 4%] Running C++ protocol buffer compiler on msgs/Distance.proto
Scanning dependencies of target sensor_msgs
[ 8%] Building CXX object CMakeFiles/sensor_msgs.dir/Distance.pb.cc.o
[ 12%] Linking CXX shared library libsensor_msgs.so
[ 62%] Built target sensor_msgs
[ 75%] Built target control_msgs
[ 79%] Linking CXX shared library libgazebo_motor_model.so
[ 83%] Built target gazebo_motor_model
[ 87%] Linking CXX shared library libgazebo_imu_plugin.so
[ 91%] Built target gazebo_imu_plugin
Scanning dependencies of target gazebo_distance_plugin
[ 95%] Building CXX object CMakeFiles/gazebo_distance_plugin.dir/src/gazebo_distance_plugin.cpp.o
/home/cuda/workspace/aircraft-plugins-new/src/gazebo_distance_plugin.cpp: In member function ‘void gazebo::GazeboDistancePlugin::OnUpdate(const gazebo::common::UpdateInfo&)’:
/home/cuda/workspace/aircraft-plugins-new/src/gazebo_distance_plugin.cpp:132:21: error: ‘class sensor_msgs::msgs::Distance’ has no member named ‘set_time_usec’
distance_message_.set_time_usec(_info.simTime.sec * 1000000 + _info.simTime.nsec / 1000);
^~~~~~~~~~~~~
CMakeFiles/gazebo_distance_plugin.dir/build.make:62: recipe for target 'CMakeFiles/gazebo_distance_plugin.dir/src/gazebo_distance_plugin.cpp.o' failed
make[2]: *** [CMakeFiles/gazebo_distance_plugin.dir/src/gazebo_distance_plugin.cpp.o] Error 1
CMakeFiles/Makefile2:218: recipe for target 'CMakeFiles/gazebo_distance_plugin.dir/all' failed
make[1]: *** [CMakeFiles/gazebo_distance_plugin.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
My bad @wil3 , sorry, there was conflict in the git pull so changes weren't showing up I have revised it meticulously and its now as should be
All prerequisites has been made to have the distance sensor plugin working, before getting into the actual SDF sensor
Files created:
Files updated:
Cmake output
~/workspace/aircraft-plugins-new/build$ cmake ..
make output
cuda@cuda~/workspace/aircraft-plugins-new/build$ make
This change is