Ask Your Question
0

Raspberry Pi TurtleSim Build Error

asked 2013-05-17 11:21:30 -0600

AlphaSierra gravatar image

updated 2014-01-28 17:16:33 -0600

ngrennan gravatar image

Hello everyone, I just got a raspberry pi and started following the debian build instructions with the raspberry pi changes listed on the wiki. (I can't link them as this is my first post) When I go to make the code I get the following error message:

[ 61%] Built target mimic
[ 61%] Built target turtle_teleop_key
[ 61%] Built target turtlesim_genlisp
[ 62%] Built target turtlesim_genpy
[ 64%] Building CXX object ros_tutorials/turtlesim/CMakeFiles/turtlesim_node.dir/src/turtle.cpp.o
/home/pi/ros-underlay/ros_tutorials/turtlesim/src/turtle.cpp: In member function âbool turtlesim::Turtle::update(double, QPainter&, const QImage&, qreal, qreal)â:
/home/pi/ros-underlay/ros_tutorials/turtlesim/src/turtle.cpp:132:58: error: no matching function for call to âmax(double, qreal)â
/home/pi/ros-underlay/ros_tutorials/turtlesim/src/turtle.cpp:132:58: note: candidates are:
/usr/include/c++/4.6/bits/stl_algobase.h:210:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
/usr/include/c++/4.6/bits/stl_algobase.h:254:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
/home/pi/ros-underlay/ros_tutorials/turtlesim/src/turtle.cpp:162:44: error: no matching function for call to âmax(qreal, double)â
/home/pi/ros-underlay/ros_tutorials/turtlesim/src/turtle.cpp:162:44: note: candidates are:
/usr/include/c++/4.6/bits/stl_algobase.h:210:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
/usr/include/c++/4.6/bits/stl_algobase.h:254:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
/home/pi/ros-underlay/ros_tutorials/turtlesim/src/turtle.cpp:163:44: error: no matching function for call to âmax(qreal, double)â
/home/pi/ros-underlay/ros_tutorials/turtlesim/src/turtle.cpp:163:44: note: candidates are:
/usr/include/c++/4.6/bits/stl_algobase.h:210:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
/usr/include/c++/4.6/bits/stl_algobase.h:254:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
make[2]: *** [ros_tutorials/turtlesim/CMakeFiles/turtlesim_node.dir/src/turtle.cpp.o] Error 1
make[1]: *** [ros_tutorials/turtlesim/CMakeFiles/turtlesim_node.dir/all] Error 2
make: *** [all] Error 2

I've searched around, and haven't been able to find a working solution for this problem. Does anyone know what's going on?

Thanks!

edit retag flag offensive close merge delete

Comments

can you tell me how to solve this problem ? thanks!!!!

wxp2012 gravatar imagewxp2012 ( 2013-08-03 22:56:57 -0600 )edit

I haven't yet been able to build the packages properly. I moved my work onto a virtual machine for making the packages. I'd suggest using the available repository if those packages will do what you need.

AlphaSierra gravatar imageAlphaSierra ( 2013-08-08 12:53:17 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2014-07-02 14:35:31 -0600

Gowtham Garimella gravatar image

The solution i found for this problem is to edit the file turtle.cpp (mentioned in the error ) and replace 0.0 in the file with qreal(0.0) and it will compile fine after that

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-05-17 11:21:30 -0600

Seen: 434 times

Last updated: Jul 02 '14