Ask Your Question
0

Error at the beginner_tutorials package - build error (ROS tutorials) [closed]

asked 2016-04-28 05:05:23 -0500

patrchri gravatar image

updated 2016-04-28 18:43:55 -0500

Hello, I am a beginner at ROS and I was doing the following tutorial : http://wiki.ros.org/ROS/Tutorials/Wri... .

I did exactly what the tutorial instructed me to do (copy - pasted the code in use) and then tried to build my project with catkin_make .I also checked the directories of the package and everything was in accordance to the tutorial's instructions .I also sourced every environmental variable needed .I am in 14.04 Ubuntu LTS (dual install with windows) .

However, I got the following errors :

/opt/ros/jade/include/ros/time.h:180:31:   required from here
/usr/include/boost/format/feed_args.hpp:248:84: error: no matching function for call to ‘boost::io::too_many_args::too_many_args(int&, int&)’
                 boost::throw_exception(too_many_args(self.cur_arg_, self.num_args_)); 
                                                                                    ^
/usr/include/boost/format/feed_args.hpp:248:84: note: candidates are:
In file included from /usr/include/boost/format.hpp:44:0,
                 from /usr/include/boost/math/policies/error_handling.hpp:31,
                 from /usr/include/boost/math/special_functions/round.hpp:14,
                 from /opt/ros/jade/include/ros/time.h:58,
                 from /opt/ros/jade/include/ros/serialization.h:34,
                 from /opt/ros/jade/include/std_msgs/String.h:14,
                 from /home/patrchri/catkin_ws/src/beginner_tutorials/src/talker.cpp:2:
/usr/include/boost/format/exceptions.hpp:66:15: note: boost::io::too_many_args::too_many_args()
         class too_many_args : public format_error
               ^
/usr/include/boost/format/exceptions.hpp:66:15: note:   candidate expects 0 arguments, 2 provided
/usr/include/boost/format/exceptions.hpp:66:15: note: boost::io::too_many_args::too_many_args(const boost::io::too_many_args&)
/usr/include/boost/format/exceptions.hpp:66:15: note:   candidate expects 1 argument, 2 provided
make[2]: *** [beginner_tutorials/CMakeFiles/talker.dir/src/talker.cpp.o] Error 1
make[1]: *** [beginner_tutorials/CMakeFiles/talker.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Could you please tell me what I am missing here and what this error means? In case more info is needed for you to help me, please tell me to edit my question .

Thank you in advance for your help .

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by patrchri
close date 2016-08-15 18:26:07.187294

Comments

This output just shows that there is an error, but not which one. Scroll up in the terminal and please post the real error message.

mgruhler gravatar image mgruhler  ( 2016-04-28 06:39:17 -0500 )edit

What OS are you on? What version of boost do you have installed on your system?

jarvisschultz gravatar image jarvisschultz  ( 2016-04-28 09:39:40 -0500 )edit

I am in Ubuntu 14.04 LTS

patrchri gravatar image patrchri  ( 2016-04-28 18:41:52 -0500 )edit

I found the error .Thank you for your help anyway :)

patrchri gravatar image patrchri  ( 2016-04-29 03:21:42 -0500 )edit

@patrchri we typically don't close questions on ROS answers. If you figured this out, maybe you could answer your own question, so others can find this solution?

mgruhler gravatar image mgruhler  ( 2016-04-29 05:38:27 -0500 )edit

@mig I need more points to reopen the question so I will answer it here .I apologize for closing it without posting the solution, but it was not something major .Due to character's limitations the answer is posted at my next comment .

patrchri gravatar image patrchri  ( 2016-04-29 06:20:01 -0500 )edit

The error was generated because of bad mistyping of the "ros/ros.h" inclusion .This happened because at start I attempted to write the code and then copy pasted the rest of the code .The strange part is that the terminal didn't indicate me the error at the file.cpp .Thanks again for your answers .

patrchri gravatar image patrchri  ( 2016-04-29 06:24:34 -0500 )edit

@patrchri, open now

mgruhler gravatar image mgruhler  ( 2016-04-29 09:10:18 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-04-29 09:46:23 -0500

patrchri gravatar image

updated 2016-04-29 09:49:00 -0500

The error was generated because of bad mistyping of the #include "ros/ros.h" statement .This happened because at start I attempted to write the code on my own, but then I decided to copy paste the rest of the code .This wrong copy paste led to a ros.h" statement instead of the proper inclusion as written above .The strange part is that the terminal didn't indicate me the error at the file.cpp as a syntax error ,as there was no #include statement .

Thanks again for your answers .

The wrong syntax was like that :

ros.h"
#include "std_msgs/String.h"

#include <sstream>

(The rest of the code in talker.cpp)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-04-28 05:05:23 -0500

Seen: 309 times

Last updated: Apr 29 '16