Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make giving error while building plugins #19

Closed
khanasif786 opened this issue Apr 14, 2022 · 1 comment
Closed

make giving error while building plugins #19

khanasif786 opened this issue Apr 14, 2022 · 1 comment

Comments

@khanasif786
Copy link

khanasif786 commented Apr 14, 2022

I Followed the setup from here
This is the output of cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo command

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for ignition-gazebo5 -- found version 5.4.0
-- Searching for dependencies of ignition-gazebo5
-- Looking for sdformat11 -- found version 11.4.1
-- Searching for dependencies of sdformat11
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.0.0
-- Looking for ignition-math6 -- found version 6.10.0
-- Searching for dependencies of ignition-math6
-- Looking for ignition-utils1 -- found version 1.4.0
-- Searching for dependencies of ignition-utils1
-- Looking for ignition-plugin1 -- found version 1.2.1
-- Searching for dependencies of ignition-plugin1
-- Searching for <ignition-plugin1> component [loader]
-- Looking for ignition-plugin1-loader -- found version 1.2.1
-- Searching for dependencies of ignition-plugin1-loader
-- Searching for <ignition-plugin1> component [register]
-- Looking for ignition-plugin1-register -- found version 1.2.1
-- Searching for dependencies of ignition-plugin1-register
-- Looking for ignition-transport10 -- found version 10.2.0
-- Searching for dependencies of ignition-transport10
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.2.5
-- Found ZeroMQ: TRUE (Required is at least version "4") 
-- Checking for module 'uuid'
--   Found uuid, version 2.31.1
-- Found UUID: TRUE  
-- Looking for ignition-utils1 -- found version 1.4.0
-- Searching for dependencies of ignition-utils1
-- Searching for <ignition-utils1> component [cli]
-- Looking for ignition-utils1-cli -- found version 1.4.0
-- Searching for dependencies of ignition-utils1-cli
-- Looking for ignition-msgs7 -- found version 7.3.0
-- Searching for dependencies of ignition-msgs7
-- Looking for ignition-math6 -- found version 6.10.0
-- Searching for <ignition-transport10> component [log]
-- Looking for ignition-transport10-log -- found version 10.2.0
-- Searching for dependencies of ignition-transport10-log
-- Looking for ignition-msgs7 -- found version 7.3.0
-- Looking for ignition-common4 -- found version 4.5.0
-- Searching for dependencies of ignition-common4
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE  
-- Searching for <ignition-common4> component [profiler]
-- Looking for ignition-common4-profiler -- found version 4.5.0
-- Searching for dependencies of ignition-common4-profiler
-- Searching for <ignition-common4> component [events]
-- Looking for ignition-common4-events -- found version 4.5.0
-- Searching for dependencies of ignition-common4-events
-- Looking for ignition-math6 -- found version 6.10.0
-- Searching for <ignition-common4> component [av]
-- Looking for ignition-common4-av -- found version 4.5.0
-- Searching for dependencies of ignition-common4-av
-- Checking for module 'libswscale'
--   Found libswscale, version 4.8.100
-- Found SWSCALE: TRUE  
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 57.10.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100") 
-- Checking for module 'libavformat'
--   Found libavformat, version 57.83.100
-- Found AVFORMAT: TRUE  
-- Checking for module 'libavcodec'
--   Found libavcodec, version 57.107.100
-- Found AVCODEC: TRUE  
-- Checking for module 'libavutil'
--   Found libavutil, version 55.78.100
-- Found AVUTIL: TRUE  
-- Looking for ignition-fuel_tools6 -- found version 6.2.0
-- Searching for dependencies of ignition-fuel_tools6
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.58.0") 
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.4
-- Found JSONCPP: TRUE  
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.1.7
-- Found YAML: TRUE  
-- Checking for module 'libzip'
--   Found libzip, version 1.1.2
-- Found ZIP: TRUE  
-- Looking for ignition-common4 -- found version 4.5.0
-- Looking for ignition-math6 -- found version 6.10.0
-- Looking for ignition-msgs7 -- found version 7.3.0
-- Looking for ignition-gui5 -- found version 5.5.0
-- Searching for dependencies of ignition-gui5
-- Looking for ignition-math6 -- found version 6.10.0
-- Looking for ignition-common4 -- found version 4.5.0
-- Looking for ignition-plugin1 -- found version 1.2.1
-- Looking for ignition-transport10 -- found version 10.2.0
-- Looking for ignition-rendering5 -- found version 5.2.1
-- Searching for dependencies of ignition-rendering5
-- Looking for ignition-math6 -- found version 6.10.0
-- Looking for ignition-common4 -- found version 4.5.0
-- Searching for dependencies of ignition-common4
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Searching for <ignition-common4> component [graphics]
-- Looking for ignition-common4-graphics -- found version 4.5.0
-- Searching for dependencies of ignition-common4-graphics
-- Looking for ignition-math6 -- found version 6.10.0
-- Looking for ignition-utils1 -- found version 1.4.0
-- Searching for <ignition-common4> component [events]
-- Looking for ignition-plugin1 -- found version 1.2.1
-- Searching for dependencies of ignition-plugin1
-- Searching for <ignition-plugin1> component [all]
-- Looking for all libraries of ignition-plugin1 -- found version 1.2.1
-- Looking for ignition-msgs7 -- found version 7.3.0
-- Looking for ignition-physics4 -- found version 4.3.0
-- Searching for dependencies of ignition-physics4
-- Looking for ignition-math6 -- found version 6.10.0
-- Searching for dependencies of ignition-math6
-- Searching for <ignition-math6> component [eigen3]
-- Looking for ignition-math6-eigen3 -- found version 6.10.0
-- Searching for dependencies of ignition-math6-eigen3
-- Looking for ignition-plugin1 -- found version 1.2.1
-- Looking for ignition-utils1 -- found version 1.4.0
-- Searching for <ignition-physics4> component [heightmap]
-- Looking for ignition-physics4-heightmap -- found version 4.3.0
-- Searching for dependencies of ignition-physics4-heightmap
-- Looking for ignition-common4 -- found version 4.5.0
-- Searching for <ignition-physics4> component [mesh]
-- Looking for ignition-physics4-mesh -- found version 4.3.0
-- Searching for dependencies of ignition-physics4-mesh
-- Looking for ignition-common4 -- found version 4.5.0
-- Searching for <ignition-physics4> component [sdf]
-- Looking for ignition-physics4-sdf -- found version 4.3.0
-- Searching for dependencies of ignition-physics4-sdf
-- Looking for sdformat11 -- found version 11.4.1
-- Looking for ignition-sensors5 -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5
-- Looking for ignition-math6 -- found version 6.10.0
-- Looking for ignition-common4 -- found version 4.5.0
-- Looking for ignition-transport10 -- found version 10.2.0
-- Looking for ignition-rendering5 -- found version 5.2.1
-- Looking for ignition-msgs7 -- found version 7.3.0
-- Looking for ignition-plugin1 -- found version 1.2.1
-- Looking for sdformat11 -- found version 11.4.1
-- Searching for <ignition-sensors5> component [rendering]
-- Looking for ignition-sensors5-rendering -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-rendering
-- Searching for <ignition-sensors5> component [air_pressure]
-- Looking for ignition-sensors5-air_pressure -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-air_pressure
-- Searching for <ignition-sensors5> component [altimeter]
-- Looking for ignition-sensors5-altimeter -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-altimeter
-- Searching for <ignition-sensors5> component [camera]
-- Looking for ignition-sensors5-camera -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-camera
-- Searching for <ignition-sensors5> component [gpu_lidar]
-- Looking for ignition-sensors5-gpu_lidar -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-gpu_lidar
-- Searching for <ignition-sensors5> component [imu]
-- Looking for ignition-sensors5-imu -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-imu
-- Searching for <ignition-sensors5> component [logical_camera]
-- Looking for ignition-sensors5-logical_camera -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-logical_camera
-- Searching for <ignition-sensors5> component [magnetometer]
-- Looking for ignition-sensors5-magnetometer -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-magnetometer
-- Searching for <ignition-sensors5> component [depth_camera]
-- Looking for ignition-sensors5-depth_camera -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-depth_camera
-- Searching for <ignition-sensors5> component [thermal_camera]
-- Looking for ignition-sensors5-thermal_camera -- found version 5.1.1
-- Searching for dependencies of ignition-sensors5-thermal_camera
-- Looking for ignition-rendering5 -- found version 5.2.1
-- Looking for ignition-math6 -- found version 6.10.0
-- Looking for ignition-utils1 -- found version 1.4.0
-- Looking for ignition-gazebo5 - found

-- RapidJSON found. Headers: /usr/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/asif/Desktop/ignition/ardupilot_gazebo/build

After running make -j4 I am getting this error

/home/asif/Desktop/ignition/ardupilot_gazebo/src/ArduPilotPlugin.cc: In function ‘void SendState()’:
/home/asif/Desktop/ignition/ardupilot_gazebo/src/ArduPilotPlugin.cc:1424:5: error: invalid use of ‘this’ in non-member function
     this->dataPtr->sock.sendto(
     ^~~~
/home/asif/Desktop/ignition/ardupilot_gazebo/src/ArduPilotPlugin.cc:1425:9: error: invalid use of ‘this’ in non-member function
         this->dataPtr->json_str.c_str(),
         ^~~~
/home/asif/Desktop/ignition/ardupilot_gazebo/src/ArduPilotPlugin.cc:1426:9: error: invalid use of ‘this’ in non-member function
         this->dataPtr->json_str.size(),
         ^~~~
/home/asif/Desktop/ignition/ardupilot_gazebo/src/ArduPilotPlugin.cc:1427:9: error: invalid use of ‘this’ in non-member function
         this->dataPtr->fcu_address,
         ^~~~
/home/asif/Desktop/ignition/ardupilot_gazebo/src/ArduPilotPlugin.cc:1428:9: error: invalid use of ‘this’ in non-member function
         this->dataPtr->fcu_port_out);
         ^~~~
CMakeFiles/ArduPilotPlugin.dir/build.make:62: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o' failed
make[2]: *** [CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/all' failed
make[1]: *** [CMakeFiles/ArduPilotPlugin.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Full error log is here

My system:
Ubuntu 18.04 (Bionic)
Ignition Edifice

@srmainwaring
Copy link
Collaborator

@khanasif786 - thanks for logging the issue. We are planning to drop support for Ignition Edifice in favour of Gazebo Garden as Edifice is EOL and Garden is now released and the default on Ubuntu 20.04 and 22.04. As of #29 Garden is our default for the plugin as well.

There were a large number of namespace changes by the Gazebo team between edifice and garden which makes maintaining the earlier versions onerous. My preference is to remove the edifice branch completely.

The error you are seeing is a little odd:

void ignition::gazebo::systems::ArduPilotPlugin::SendState() const
{
#if DEBUG_JSON_IO
auto bytes_sent =
#endif
this->dataPtr->sock.sendto(
this->dataPtr->json_str.c_str(),
this->dataPtr->json_str.size(),
this->dataPtr->fcu_address,
this->dataPtr->fcu_port_out);
#if DEBUG_JSON_IO
igndbg << "sent " << bytes_sent << " bytes to "
<< this->dataPtr->fcu_address << ":" << this->dataPtr->fcu_port_out << "\n"
<< "frame_count: " << this->dataPtr->fcu_frame_count << "\n";
#endif

looks like a valid member function, so I'm not sure why there is a compiler error claiming it isn't. I can't reproduce on main, but the namespace does need cleaning up (next PR is to apply cpplint and friends). If you still see the issue on the latest version please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants