start-jsk / rtmros_gazebo

gazebo simulation for rtmros robots
8 stars 24 forks source link

Error about sdf method when compiling gazebo plugin #118

Closed mmurooka closed 10 years ago

mmurooka commented 10 years ago

I got foloowing error, when I do catkin_make --only-pkg-with-deps hrpsys_gazebo_general.

/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp: In member function ‘virtual void gazebo::IOBPlugin::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:24:35: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:24:50: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:29:30: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:29:45: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:38:44: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:38:48: error: expected primary-expression before ‘bool’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:38:48: error: expected ‘;’ before ‘bool’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:44:41: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:44:45: error: expected primary-expression before ‘bool’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:44:45: error: expected ‘;’ before ‘bool’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:294:58: error: ‘class gazebo::physics::Joint’ has no member named ‘GetDamping’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:296:60: error: ‘class gazebo::physics::Joint’ has no member named ‘GetDamping’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp: In member function ‘void gazebo::IOBPlugin::GetRobotStates(const gazebo::common::Time&)’:
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:683:63: warning: ‘virtual double gazebo::physics::Joint::GetForce(int)’ is deprecated (declared at /usr/local/include/gazebo-1.5/gazebo/physics/Joint.hh:277) [-Wdeprecated-declarations]
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp: In member function ‘virtual void gazebo::AddForce::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:36:25: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:36:40: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:40:26: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:40:41: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:44:22: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:44:39: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:48:23: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:48:40: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:52:25: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/AddForcePlugin.cpp:52:42: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/SetVelPlugin.cpp: In member function ‘virtual void gazebo::SetVel::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/SetVelPlugin.cpp:36:25: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/SetVelPlugin.cpp:36:40: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/SetVelPlugin.cpp:40:26: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/SetVelPlugin.cpp:40:41: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/GetVelPlugin.cpp: In member function ‘virtual void gazebo::GetVel::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/GetVelPlugin.cpp:41:25: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/GetVelPlugin.cpp:41:40: error: expected primary-expression before ‘>’ token
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/GetVelPlugin.cpp:45:26: error: ‘class sdf::Element’ has no member named ‘Get’
/home/jskuser/ros/hydro/src/rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/src/GetVelPlugin.cpp:45:41: error: expected primary-expression before ‘>’ token
make[2]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/AddForcePlugin.dir/src/AddForcePlugin.cpp.o] Error 1
make[1]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/AddForcePlugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/SetVelPlugin.dir/src/SetVelPlugin.cpp.o] Error 1
make[1]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/SetVelPlugin.dir/all] Error 2
make[2]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/GetVelPlugin.dir/src/GetVelPlugin.cpp.o] Error 1
make[1]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/GetVelPlugin.dir/all] Error 2
make[2]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/IOBPlugin.dir/src/IOBPlugin.cpp.o] Error 1
make[1]: *** [rtm-ros-robotics/rtmros_gazebo/hrpsys_gazebo_general/CMakeFiles/IOBPlugin.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
mmurooka commented 10 years ago

Only for JSK people, the PC is mensa.

k-okada commented 10 years ago

Does travis passed with hydro? If so, check installed drcsim/gazebo version

mmurooka commented 10 years ago

drcsim/gazebo version is 3.2, which is same with other PC. travis is not passing...

k-okada commented 10 years ago

https://travis-ci.org/start-jsk/rtmros_gazebo/builds/33652927 This build passed two weeks ago. Restarted to see if this passes now

k-okada commented 10 years ago

at least compile with deb works, as for compile from source, it fails during apt-get, so it is still unknown if it is able to compileable.

k-okada commented 10 years ago

please check catkin_make --make-args VERBOSE=1

mmurooka commented 10 years ago

Error message was same with catkin_make --make-args VERBOSE=1.

I think following pkg-config result is not correct. It should return gazaebo-3.1 directory.

jskuser@mensa:~$ pkg-config --cflags gazebo
-I/usr/local/include/gazebo-1.5 -I/usr/local/include/gazebo-1.5/gazebo  

jskuser@mensa:~$ aptitude show gazebo
Package: gazebo                          
State: not installed
Version: 1.9.6-1~precise
...

jskuser@mensa:~$ aptitude show gazebo3
Package: gazebo3                         
New: yes
State: installed
Automatically installed: yes
Multi-Arch: foreign
Version: 3.1.0-1~precise
...

jskuser@mensa:~$ grep GAZEBO_INCLUDE ~/ros/hydro/build/CMakeCache.txt
GAZEBO_INCLUDEDIR:INTERNAL=/usr/local/include
GAZEBO_INCLUDE_DIRS:INTERNAL=/usr/local/include/gazebo-1.5;/usr/local/include/gazebo-1.5/gazebo
mmurooka commented 10 years ago

I removed build, devel directory. but the result was same.

k-okada commented 10 years ago

On Thu, Sep 11, 2014 at 12:14 PM, Masaki Murooka notifications@github.com wrote:

-I/usr/local/include/gazebo-1.5 -I/usr/local/include/gazebo-1.5/gazebo

it seems you have installed gazebo-1.5 from source, you need to remove that.

mmurooka commented 10 years ago
jskuser@mensa:~$ sudo rm -rf /usr/local/include/gazebo-1.5/ /usr/local/lib/gazebo-1.5/ /usr/local/share/gazebo-1.5/
jskuser@mensa:~$ pkg-config --cflags gazebo
-I/usr/local/include/gazebo-1.5 -I/usr/local/include/gazebo-1.5/gazebo  
mmurooka commented 10 years ago

Thank you @k-okada sensei, it worked.

k-okada commented 10 years ago

note: you need to remove /usr/local/lib/pkgconfig/gazebo*.pc

On Thu, Sep 11, 2014 at 4:37 PM, Masaki Murooka notifications@github.com wrote:

Thank you @k-okada https://github.com/k-okada sensei, it worked.

— Reply to this email directly or view it on GitHub https://github.com/start-jsk/rtmros_gazebo/issues/118#issuecomment-55230103 .