Hello! I have been trying to compile my project with ROS Indigo and C++ (Ubuntu 14.04) and getting an error which I do not understand. I define a class named Point2dc and in the code, it is used multiple times to create vectors etc. The (4000 line) error I get can be found below under the link:
http://pastebin.com/LWMd7j8y
The class is defined as follows:
#ifndef POINT2DC_H
#define POINT2DC_H
#include "ros/ros.h"
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
using namespace ros;
class Point2dc
{
public:
Point2dc(float pos_x, float pos_y);
Point2dc();
float pos_x;
float pos_y;
float get_polar_angle();
float get_polar_r();
float distance_to_point(Point2dc p);
};
#endif
The error occurs, when including "ros/ros.h" in another custom class called Vehicle.
Thanks in advance.
Edit:
This is just a small excerpt of the error I get. For the full error, please check the link above. Excuse my poor formatting :)
from /usr/include/boost/math/tools/config.hpp:16,
from /usr/include/boost/math/special_functions/round.hpp:13,
from /opt/ros/indigo/include/ros/time.h:58,
from /opt/ros/indigo/include/ros/ros.h:38,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:166:17: note: ‘Point2dc’ is not derived from ‘conststd::_List_iterator<_Tp>’
if (*__first == __val)
^
In file included from /usr/include/c++/4.8/set:62:0,
from /opt/ros/indigo/include/ros/forwards.h:34,
from /opt/ros/indigo/include/ros/common.h:37,
from /opt/ros/indigo/include/ros/ros.h:43,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_multiset.h:739:5: note: template bool std::operator==(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)
operator==(const multiset<_Key, _Compare, _Alloc>& __x,
^
/usr/include/c++/4.8/bits/stl_multiset.h:739:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /usr/include/boost/math/tools/config.hpp:16,
from /usr/include/boost/math/special_functions/round.hpp:13,
from /opt/ros/indigo/include/ros/time.h:58,
from /opt/ros/indigo/include/ros/ros.h:38,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:166:17: note: ‘Point2dc’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’
if (*__first == __val)
^
In file included from /usr/include/c++/4.8/set:61:0,
from /opt/ros/indigo/include/ros/forwards.h:34,
from /opt/ros/indigo/include/ros/common.h:37,
from /opt/ros/indigo/include/ros/ros.h:43,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_set.h:754:5: note: template bool std::operator==(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)
operator==(const set<_Key, _Compare, _Alloc>& __x,
^
/usr/include/c++/4.8/bits/stl_set.h:754:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /usr/include/boost/math/tools/config.hpp:16,
from /usr/include/boost/math/special_functions/round.hpp:13,
from /opt/ros/indigo/include/ros/time.h:58,
from /opt/ros/indigo/include/ros/ros.h:38,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:166:17: note: ‘Point2dc’ is not derived from ‘const std::set<_Key, _Compare, _Alloc>’
if (*__first == __val)
^
In file included from /usr/include/c++/4.8/map:62:0,
from /opt/ros/indigo/include/ros/console.h:42,
from /opt/ros/indigo/include/ros/ros.h:40,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template bool std::operator==(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)
operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
^
/usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /usr/include/boost/math/tools/config.hpp:16,
from /usr/include/boost/math/special_functions/round.hpp:13,
from /opt/ros/indigo/include/ros/time.h:58,
from /opt/ros/indigo/include/ros/ros.h:38,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:166:17: note: ‘Point2dc’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’
if (*__first == __val)
^
In file included from /usr/include/c++/4.8/map:61:0,
from /opt/ros/indigo/include/ros/console.h:42,
from /opt/ros/indigo/include/ros/ros.h:40,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_map.h:962:5: note: template bool std::operator==(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)
operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
^
/usr/include/c++/4.8/bits/stl_map.h:962:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /usr/include/boost/math/tools/config.hpp:16,
from /usr/include/boost/math/special_functions/round.hpp:13,
from /opt/ros/indigo/include/ros/time.h:58,
from /opt/ros/indigo/include/ros/ros.h:38,
from /home/mertes13/catkin_ws/src/irt_visualization/include/Vehicle.h:4,
from /home/mertes13/catkin_ws/src/irt_visualization/src/Vehicle.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:166:17: note: ‘Point2dc’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’
if (*__first == __val)
^
↧