Open Po-Jen opened 9 years ago
The first error below seems to be that catkin does not find the agile_grasp messages. Can you try to build the agile_grasp messages before building agile_grasp using: catkin_make agile_grasp_generate_messages
(Header files for ROS messages are build from message files within the msg folder automatically. They do not have to be in the include folder.)
-- Andreas
----- Original Message ----- From: "Po-Jen Lai" notifications@github.com To: "atenpas/agile_grasp" agile_grasp@noreply.github.com Sent: Thursday, July 23, 2015 5:44:03 AM Subject: [agile_grasp] Building error on grasp_localizer.cpp.o (#2)
Hi, I tried to build agile_grasp 0.7.1 for Hydro on 64-bits Ubtuntu 12.04. However, it seems that there are some problems in grasp_localizer.h mainly related to ‘agile_grasp’ does not name a type.
I checked grasp_localizer.h and found that the problem might occur from the headers below to be included in grasp_localizer.h. I cannot find these header files in the package.
#include <agile_grasp/CloudSized.h>
#include <agile_grasp/Grasp.h>
#include <agile_grasp/Grasps.h>
#include <agile_grasp/grasp_hypothesis.h>
#include <agile_grasp/handle.h>
#include <agile_grasp/localization.h>
#include <agile_grasp/rotating_hand.h>
Here's the error message I got from catkin_make:
[ 96%] [ 96%] [ 98%] Building CXX object agile_grasp/CMakeFiles/grasp_localizer.dir/src/agile_grasp/grasp_localizer.cpp.o
Built target antipodal_test
Built target test_svm
Built target learning_test
In file included from /home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:1:0:
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:133:35: error: ‘agile_grasp’ does not name a type
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:133:58: error: expected unqualified-id before ‘&’ token
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:133:58: error: expected ‘)’ before ‘&’ token
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:133:48: error: expected ‘;’ at end of member declaration
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:133:60: error: ISO C++ forbids declaration of ‘msg’ with no type [-fpermissive]
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:133:60: error: expected ‘;’ at end of member declaration
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:133:63: error: expected unqualified-id before ‘)’ token
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:140:3: error: ‘agile_grasp’ does not name a type
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:147:3: error: ‘agile_grasp’ does not name a type
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:153:3: error: ‘agile_grasp’ does not name a type
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:159:3: error: ‘agile_grasp’ does not name a type
/home/rosfuerte/code/ros_hydro/src/agile_grasp/include/agile_grasp/grasp_localizer.h:165:3: error: ‘agile_grasp’ does not name a type
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp: In constructor ‘GraspLocalizer::GraspLocalizer(ros::NodeHandle&, const string&, const string&, int, const string&, const GraspLocalizer::Parameters&)’:
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:4:1: error: uninitialized reference member ‘GraspLocalizer::msg’ [-fpermissive]
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:13:90: error: no matching function for call to ‘ros::NodeHandle::subscribe(const string&, int, void (GraspLocalizer::*)(...), GraspLocalizer* const)’
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:13:90: note: candidates are:
/opt/ros/hydro/include/ros/node_handle.h:379:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), T*, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:390:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M)const, T*, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:438:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&), T*, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:448:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, T*, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:498:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), const boost::shared_ptr<U>&, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:509:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M)const, const boost::shared_ptr<U>&, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:559:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&), const boost::shared_ptr<U>&, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:570:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, const boost::shared_ptr<U>&, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:618:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(M), const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:663:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(const boost::shared_ptr<const M>&), const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:706:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(const boost::shared_ptr<const M>&)>&, const VoidConstPtr&, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:752:14: note: template<class M, class C> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(C)>&, const VoidConstPtr&, const ros::TransportHints&)
/opt/ros/hydro/include/ros/node_handle.h:785:14: note: ros::Subscriber ros::NodeHandle::subscribe(ros::SubscribeOptions&)
/opt/ros/hydro/include/ros/node_handle.h:785:14: note: candidate expects 1 argument, 4 provided
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:18:32: error: ‘agile_grasp’ was not declared in this scope
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:18:22: error: parse error in template argument list
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:18:65: error: no matching function for call to ‘ros::NodeHandle::advertise(const char [7], int)’
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:18:65: note: candidates are:
/opt/ros/hydro/include/ros/node_handle.h:236:15: note: template<class M> ros::Publisher ros::NodeHandle::advertise(const string&, uint32_t, bool)
/opt/ros/hydro/include/ros/node_handle.h:300:13: note: template<class M> ros::Publisher ros::NodeHandle::advertise(const string&, uint32_t, const SubscriberStatusCallback&, const SubscriberStatusCallback&, const VoidConstPtr&, bool)
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp: At global scope:
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:59:49: error: ‘agile_grasp’ does not name a type
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:59:72: error: expected unqualified-id before ‘&’ token
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:59:72: error: expected ‘)’ before ‘&’ token
/home/rosfuerte/code/ros_hydro/src/agile_grasp/src/agile_grasp/grasp_localizer.cpp:59:72: error: expected initializer before ‘&’ token
make[2]: *** [agile_grasp/CMakeFiles/grasp_localizer.dir/src/agile_grasp/grasp_localizer.cpp.o] Error 1
make[1]: *** [agile_grasp/CMakeFiles/grasp_localizer.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
Any suggestion on this issue? Maybe these header files should be put in the include/agile_grasp directory? Thx.
Reply to this email directly or view it on GitHub: https://github.com/atenpas/agile_grasp/issues/2
Thanks for the reply.
I think your solution can solve this issue, but now I encounter another problem when catkin_make agile_grasp_generate_messages. So I am not able to verify it for now.
I'll close this issue after I solve the problem and build grasp_localizer.cpp.o successfully. Thanks again.
Hi, I tried to build agile_grasp 0.7.1 for Hydro on 64-bits Ubtuntu 12.04. However, it seems that there are some problems in grasp_localizer.h mainly related to ‘agile_grasp’ does not name a type.
I checked grasp_localizer.h and found that the problem might occur from the headers below to be included in grasp_localizer.h. I cannot find these header files in the package.
Here's the error message I got from catkin_make:
Any suggestion on this issue? Maybe these header files should be put in the include/agile_grasp directory? Thx.