0
$\begingroup$

Rosanswers logo

I am working through the Stage Simulating One Robot tutorial, but am having trouble compiling teleop_base. I had to change the default directories in several places, and am now stuck with errors in the cmake files related to boost (at least, this is what I gather from the output). Here is the end of the results from running "rosmake teleop_base":

rosmake ] Last 40 linesleop_base: 2.1 sec ] [ 1 Active 42/43 Complete ]

{-------------------------------------------------------------------------------

cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild/rostoolchain.cmake ..

[rosbuild] Building package teleop_base

[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake

[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake

[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake

-- Configuring done

-- Generating done

CMake Warning:

Manually-specified variables were not used by the project:

      CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /opt/ros/electric/stacks/teleop_base/build

cd build && make -l4

make[1]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[2]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

[ 0%] Built target rospack_genmsg_libexe

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

[ 0%] Built target rosbuild_precompile

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

[ 50%] Built target teleop_base

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

[100%] Building CXX object CMakeFiles/teleop_base_keyboard.dir/src/teleop_base_keyboard.o

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp: In function ‘int main(int, char**)’:

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error: cannot call constructor ‘boost::thread::thread’ directly [-fpermissive]

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error:
for a function-style cast, remove the redundant ‘::thread’ [-fpermissive]

make[3]: *** [CMakeFiles/teleop_base_keyboard.dir/src/teleop_base_keyboard.o] Error 1

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

make[2]: *** [CMakeFiles/teleop_base_keyboard.dir/all] Error 2

make[2]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

-------------------------------------------------------------------------------}

[ rosmake ] Output from build of package teleop_base written to:

[ rosmake ] /home/phillip/.ros/rosmake/rosmake_output-20111117- 215908/teleop_base/build_output.log

[rosmake-0] Finished <<< teleop_base [FAIL] [ 2.06 seconds ]

[ rosmake ] Halting due to failure in package teleop_base.

[ rosmake ] Waiting for other threads to complete.

[ rosmake ] Results:

[ rosmake ] Built 43 packages with 1 failures.

[ rosmake ] Summary output to directory

[ rosmake ] /home/phillip/.ros/rosmake/rosmake_output-20111117-215908

Any help as to where to start fixing this problem would be welcome. I'm not even quite sure where to look/what the errors might be in relation to. I'm new to ROS and Stage. Thank you in advance.


Originally posted by pmwalk on ROS Answers with karma: 65 on 2011-11-17

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I got the same error, and looking through the output:

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error: cannot call constructor ‘boost::thread::thread’ directly [-fpermissive]

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error: for a function-style cast, remove the redundant ‘::thread’ [-fpermissive]

so I went into teleop_base/src/teleop_base_keyboard.cpp and removed the redundant '::thread'

It seems to work now.

Cheers!


Originally posted by Narton with karma: 83 on 2011-12-07

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by osuairt on 2012-01-15:
You are a saint and a scholar.

Comment by pmwalk on 2011-12-15:
That seems to have been the problem, thanks!

Comment by basbaum on 2013-04-11:
Hello guys, I'm removing the '::thread' redundancy and still the problem persists - I'm using groovy now. Just checking, the line at the teleop_base_keyboard.cpp will become boost::thread t = boost::thread(boost::bind(&TBK_Node::keyboardLoop, &tbk)); correct?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.