ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

migueloliveira's profile - activity

2015-02-27 07:27:11 -0500 received badge  Great Question (source)
2012-09-06 21:06:59 -0500 received badge  Famous Question (source)
2012-09-06 21:06:59 -0500 received badge  Notable Question (source)
2012-09-06 21:06:59 -0500 received badge  Popular Question (source)
2012-08-30 14:43:56 -0500 received badge  Famous Question (source)
2012-03-30 11:55:13 -0500 received badge  Notable Question (source)
2011-11-21 21:35:42 -0500 received badge  Popular Question (source)
2011-11-17 23:57:11 -0500 received badge  Good Question (source)
2011-08-02 11:18:16 -0500 marked best answer Camera_Info_Manager

I found the problem. I had a problem in the CMakeList.txt. Sorry for the trouble. Its solved. - migueloliveira (May 30)

2011-05-30 03:07:46 -0500 commented question Camera_Info_Manager
I found the problem. I had a problem in the CMakeList.txt. Sorry for the trouble. Its solved.
2011-05-30 02:13:20 -0500 asked a question Camera_Info_Manager

Hello

I am trying to do a bumblebee xb3 driver and I have the following problem.

I found out a driver needs to supply the service set_camera_info for stereo camera calibration, because when i run stereo calibration the output is

mike@BLACKBANDIT:~$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 right:=/xb3_short/right/image_raw left:=/xb3_short/left/image_raw right_camera:=/xb3_short/right left_camera:=/xb3_short/left Waiting for service /xb3_short/left/set_camera_info ... Service not found Waiting for service /xb3_short/right/set_camera_info ... Service not found

Hence i started looking for this service. I found in http://www.ros.org/doc/api/camera1394... that we should use dynamic_reconfigure.

I also found that one should use camera_info_manager.

Well, problem is I cannot make them work togheter.

To have the dynamic_reconfigure i need to add to the CMakeLists.txt the follwoing

add dynamic reconfigure api

rosbuild_find_ros_package(dynamic_reconfigure) include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake) gencfg() rosbuild_add_executable(dynamic_reconfigure_node src/dynamic_reconfigure_node.cpp)

And when I do add this to the CmakeList.txt there is a strange linking error about the camera_info_manager

[ 0%] Built target rospack_genmsg_libexe [ 0%] Built target rosbuild_precompile [ 25%] Building CXX object CMakeFiles/pgrlibdcstereo.dir/src/pgr_conversions.o [ 50%] Building CXX object CMakeFiles/pgrlibdcstereo.dir/src/pgr_registers.o [ 75%] Building CXX object CMakeFiles/pgrlibdcstereo.dir/src/pgr_stereocam.o Linking CXX shared library lib/libpgrlibdcstereo.so [ 75%] Built target pgrlibdcstereo [100%] Building CXX object CMakeFiles/xb3.dir/src/xb3.o Linking CXX executable bin/xb3 CMakeFiles/xb3.dir/src/xb3.o: In function main': xb3.cpp:(.text+0x173d): undefined reference tocamera_info_manager::CameraInfoManager::CameraInfoManager(ros::NodeHandle, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)' collect2: ld returned 1 exit status

This does not occur when I have the CMakeList.txt without the previous lines.

I initialize camera_info_manager standard like

ros::NodeHandle nh;
CameraInfoManager TEST(nh);

Any hint?

Thanks

Miguel

2011-05-23 06:34:20 -0500 marked best answer Disabling boost for a custom package

It seems that boost (with the pointgrey library) really is the problem. Unfortunately, yes, you do need roscpp for writing a C++ publisher.

Usually that should not happen. I don't know of a solution, but can you check what "ldd 'that pointgrey lib'" gives you. It should list the linked libraries. Possibly there is some conflict.

2011-05-19 23:53:52 -0500 received badge  Editor (source)
2011-05-19 23:52:26 -0500 answered a question Disabling boost for a custom package

Hey

Thanks

I have tried to use rosbuild_remove_link_flags(). Something is wrong. I can't seem to make it work. No matter what I write there, it is always the same linking instruction.

I have also tried to print using CMakeLists.txt the variables ROS uses for creating the linking instruction and they are empty?

Do you know what i could be doing wrong?

Here is my CMakeLists.txt . My executable is named olaola. It links to libs triclops and pgrstereo and to all the ones in ROS.

1 cmake_minimum_required(VERSION 2.4.6) 2 include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) 3 4 # Set the build type. Options are: 5 # Coverage : w/ debug symbols, w/o optimization, w/ code-coverage 6 # Debug : w/ debug symbols, w/o optimization 7 # Release : w/o debug symbols, w/ optimization 8 # RelWithDebInfo : w/ debug symbols, w/ optimization 9 # MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries 10 #set(ROS_BUILD_TYPE Coverage) 11 set(ROS_BUILD_TYPE Debug) 12 13 rosbuild_init() 14 15 #set the default path for built executables to the "bin" directory 16 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) 17 #set the default path for built libraries to the "lib" directory 18 set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 19 20 #Adding triclops include directory 21 include_directories(/usr/local/include/triclops) 22 23 #Creating a pgr library 24 rosbuild_add_library(pgrlibdcstereo src/pgr_conversions.cpp src/pgr_registers. cpp src/pgr_stereocam.cpp) 25 26 #Creating olaola executable 27 rosbuild_add_executable(olaola src/test.cpp) 28 rosbuild_add_compile_flags(olaola -I/usr/local/include/triclops) 29 link_directories(/usr/local/lib/triclops/) 30 31 #Adding target link libs 32 target_link_libraries(olaola triclops) 33 target_link_libraries(olaola pnmutils) 34 target_link_libraries(olaola pgrlibdcstereo) 35 36 #Removing link and compile flags. Tried several none works 37 rosbuild_remove_link_flags(olaola "-Wl") 38 rosbuild_remove_link_flags(olaola "-lboost_thread-mt") 39 rosbuild_remove_compile_flags(olaola "-Wl") 40 41 #A test to try to figure out outs inside the CMAKE vars. the TESTVAR is just t o be sure I know how to print a variable. The other are to print the variable ROS uses for crating the linking instruction.
42 set(TESTVAR "this is the content of the test var") 43 MESSAGE("TESTVAR = ${TESTVAR}") 44 45 MESSAGE(STATUS "MYLINKFLAGS ARE =" ${LINK_FLAGS}) 46 MESSAGE(STATUS "MY CMAKE_EXE_LINKER_FLAGS ARE =" ${CMAKE_EXE_LINKER_FLAGS}) 47 MESSAGE(STATUS "MY ROS_LINK_LIBS =" ${ROS_LINK_LIBS})

And the output of these prints is:

mike@BLACKBANDIT:~/workingcopy/arpua/sensors/camera/xb3$ make -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done [rosbuild] Building package xb3 [rosbuild] Cached build flags older than manifests; calling rospack to get flags [rosbuild] Including /opt/ros/diamondback/stacks/ros_comm/clients/rospy/cmake/rospy.cmake [rosbuild] Including /opt/ros/diamondback/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake [rosbuild] Including /opt/ros/diamondback ... (more)

2011-05-19 03:21:03 -0500 answered a question Disabling boost for a custom package

Hello Dornhege

the point grey lib was actually compiled for libboost 1.37. I am trying to get another version compiled for the proper boost version but was still not able to convince them.

ROS uses version 1.42

I actually made a couple more tests and I think I am closer to the problem.

The problem is in -lboost_thread-mt

roscpp includes it in two separate parts of the linking instruction, which is something like this:

g++ test.cpp -o test -L -lboost_thread-mt (... a lot of stuff here...) -BStatic (... a lot of stuff here...) -Bdynamic -lboost_thread-mt (... a lot of stuff here...)

I do have the full linking instructions, if you want i can copy paste them here but they are very large.

What I have discovered is that if I remove the first -lboost_thread from the instruction (I do this manually) the code runs fine without a segmentation fault.

The second -lboost_thread DOES NOT CRASH the code.

Any idea why this happens? What is the difference between the first and second?

How can I remove the first in CMakeList.txt

Thanks very much for your help.

Miguel

2011-05-16 03:05:23 -0500 commented answer Disabling boost for a custom package
Yep you're right. I have just received an email from pointgrey saying they linked their library against boost 1.38. I am using boost 1.42. Perhaps this is the problem. Hopefully. Thanks for the fast repplys. I will get back ...
2011-05-16 02:00:42 -0500 answered a question Disabling boost for a custom package

Thanks all for answering my question.

I will try to answer to all and ask new questions while im at it :)

Basically the segmentation fault I mention is in a thread related function of point greys library. triclopsSetMaxThread().

Regarding the sugestion of Bram van de Klundert:

This is not an option since i need to use the library provided by point grey to perform stereo calculation. I mean, i could just implement image acquisition with libdc1394 but for stereo calculation i would have to use triclops and the problem would still exist.

Regarding tfoote

Ok. Disabling boost is not an option. Just a question: i do need roscpp for making a publisher in c++ right?

Regarding dornhedge

I took a look at what the Makefile (or cmake) is doing (using your verbose). Basically, the problem i found is that (after i have added all required rosdeps) the make is actually doing the following (please be patient its a long instruction). I just found that if i take away the boost related libs (I will highlight them in bold for easy identification) (i did this mannually) the segmentation fault problem disapears.

This is why i wanted to disable boost in the first place.

/usr/bin/g++ -Wl,-rpath,/home/mike/workingcopy/libdc1394v2/libdc1394v2/lib -Wl,-rpath,/opt/ros/diamondback/stacks/image_common/camera_calibration_parsers/lib -Wl,-rpath,/opt/ros/diamondback/stacks/common/yaml_cpp/yaml-cpp/lib -Wl,-rpath,/opt/ros/diamondback/stacks/image_common/image_transport/lib -Wl,-rpath,/opt/ros/diamondback/stacks/common/pluginlib/lib -Wl,-rpath,/opt/ros/diamondback/stacks/common/tinyxml -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/utilities/message_filters/lib -Wl,-rpath,/opt/ros/diamondback/stacks/common_msgs/sensor_msgs/lib -Wl,-rpath,/opt/ros/diamondback/stacks/driver_common/dynamic_reconfigure/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/lib -Wl,-rpath,/opt/ros/diamondback/stacks/vision_opencv/cv_bridge/lib -Wl,-rpath,/opt/ros/diamondback/stacks/vision_opencv/opencv2/opencv/lib -Wl,-rpath,/opt/ros/diamondback/stacks/common_msgs/sensor_msgs/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/tools/rosbag/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/tools/topic_tools/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp_serialization/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/utilities/xmlrpcpp/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/tools/rosconsole/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/utilities/rostime/lib -Wl,-rpath,/opt/ros/diamondback/stacks/ros_comm/utilities/cpp_common/lib -Wl,-rpath,/opt/ros/diamondback/ros/core/roslib/lib -Wl,-rpath,/opt/ros/diamondback/ros/tools/rospack/lib -pthread CMakeFiles/xb3.dir/src/xb3.o -o ../bin/xb3 -rdynamic -L/home/mike/workingcopy/libdc1394v2/libdc1394v2/lib -L/opt/ros/diamondback/stacks/image_common/camera_calibration_parsers/lib -L/opt/ros/diamondback/stacks/common/yaml_cpp/yaml-cpp/lib -L/opt/ros/diamondback/stacks/image_common/image_transport/lib -L/opt/ros/diamondback/stacks/common/pluginlib/lib -L/opt/ros/diamondback/stacks/common/tinyxml -L/opt/ros/diamondback/stacks/ros_comm/utilities/message_filters/lib -L/opt/ros/diamondback/stacks/common_msgs/sensor_msgs/lib ... (more)

2011-05-13 04:50:31 -0500 received badge  Nice Question (source)
2011-05-13 03:50:46 -0500 received badge  Student (source)
2011-05-13 02:31:32 -0500 asked a question Disabling boost for a custom package

Hello

I am new to ros.

I am trying to create a rospkg for the bumblebee XB3 camera from point grey.

I have followed all the documentation for creating a package and so on.

Problem is, i must use a closed library from point grey (triclops). This library uses multi thread and i think there is a problem with the ros cmake, namely on the boost options.

Basically, if i mannually compile a code (using g++ test.cpp -o test) it runs fine but if i compile using ros cmake it seg faults.

I experimented a bit and found that if i manually remove boost from the compilation line it works.

So my question is if there is someway of saying in the CMakeList.txt file that no boost libs are to be used.

Best regards

Miguel Oliveira

University of Aveiro