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

Ricardo's profile - activity

2015-06-11 22:48:14 -0500 received badge  Famous Question (source)
2015-02-16 10:14:49 -0500 received badge  Notable Question (source)
2015-02-16 09:34:59 -0500 answered a question Ubuntu 12.04 on PR2 is unable to install libfreenect-dev

Hi Devon,

I've checked the sources in sources.list.d:

cat pr2debs.list deb http://packages.ros.org/pr2/ubuntu precise main cat pr2debspr2.list deb http://packages.ros.org/pr2/ubuntu precise pr2 cat rosdebs.list deb http://packages.ros.org/ros/ubuntu precise main

No other source is listed in the sources.list file (In fact, all of them are commented #). I think these are special repositories for the PR2 platform. Unfortunately, there is no libfreenect-dev in these repositories.

I'm afraid if I add "http://archive.ubuntu.com/ubuntu/ precise universe" to the robot sources there could be inconsistencies between the packages versions, and our robot will be unstable.

2015-02-13 12:32:34 -0500 received badge  Popular Question (source)
2015-02-12 09:49:12 -0500 received badge  Student (source)
2015-02-12 07:46:00 -0500 asked a question Ubuntu 12.04 on PR2 is unable to install libfreenect-dev

Hello,

I am working on a PR2 robot (hydro) and I would like to install libfreenect-dev to develop a package for rgbd (kinect) mapping. However, I cannot install this library.

I receive the message "E: Package 'libfreenect-dev' has no installation candidate" from the apt-get manager.

I could install it in my workstation (running the same configuration: ubuntu 12.04, ROS hydro) but not in the PR2.

I looked this library into the ros repositories (from the PR2) but I couldn't find it.

Have you experienced this before? Do you have any clue how to install it or why is it not available for the PR2 platform?

I would appreciate your help.

2013-08-16 22:53:31 -0500 received badge  Taxonomist
2013-03-26 13:58:07 -0500 received badge  Famous Question (source)
2013-02-28 13:31:30 -0500 received badge  Notable Question (source)
2013-02-24 17:42:32 -0500 received badge  Teacher (source)
2013-02-24 17:42:32 -0500 received badge  Self-Learner (source)
2013-02-24 17:41:52 -0500 received badge  Popular Question (source)
2013-02-23 01:29:50 -0500 answered a question How should I modify my CMakeLists file to build a Qt Ros node?

I found the solution to my problem:

As I was using my previous project it had some cache files from the previous buildings that were creating conflicts. I deleted them.

After I manage to pass that issue I found many undefined references due to some third party libraries I am using. I included those third-party libraries. The final CMakeLists.txt file looks like this:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Setup
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()

rosbuild_include(qt_build qt-ros)

# Call any of qt-ros' api, e.g.
rosbuild_prepare_qt4(QtCore QtGui QtNetwork)

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#third party libraries
FIND_LIBRARY( SENSOR_LIBRARY sensor ${CMAKE_INSTALL_PREFIX}/lib )
FIND_LIBRARY( QDISPLAY_LIBRARY qdisplay ${CMAKE_INSTALL_PREFIX}/lib )

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/*.hpp src/client.h)

QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})

file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)


#file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/client.cpp src/main.cpp)

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#rosbuild_add_library(cliento src/client.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(client src/main.cpp) 
rosbuild_add_executable(robot_client ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
target_link_libraries(robot_client ${QT_LIBRARIES} ${SENSOR_LIBRARY} ${QDISPLAY_LIBRARY})
#target_link_libraries(example ${PROJECT_NAME})

I did not change the manifest file.

2013-02-23 01:00:08 -0500 received badge  Editor (source)
2013-02-22 15:36:06 -0500 asked a question How should I modify my CMakeLists file to build a Qt Ros node?

Hello,

I am trying to build a ros node with some code I developed to control a robot using some qt libraries. I checked some tutorials but I can not make it build.

I have three files: the main.cpp that creates and call and object of type (which is in client.cpp and client.h). The three files uses qt objects or functions (mainly network and gui elements).

This is how my manifest.xml and CMakeLists.txt look like:

<package>
  <description brief="robot">

     robot

  </description>
  <author>Me</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url></url>
  <depend package="std_msgs"/>
  <depend package="roscpp"/>
  <depend package="rospy"/>
  <depend package="opencv2"/>
  <depend package="sensor_msgs"/>
  <depend package="geometry_msgs"/>
  <depend package="image_geometry"/>
  <depend package="tf"/>
  <depend package="qt_build"/>
  <rosdep name="libqt4-dev"/>
  <rosdep name="qt4-qmake"/>

</package>

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Setup
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()

rosbuild_include(qt_build qt-ros)

# Call any of qt-ros' components
rosbuild_prepare_qt4(QtCore QtGui QtNetwork)


#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/*.hpp src/client.h)

QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})

file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)


#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#rosbuild_add_library(cliento src/client.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(client src/main.cpp) 
rosbuild_add_executable(robot_client ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
target_link_libraries(robot_client ${QT_LIBRARIES})
#target_link_libraries(example ${PROJECT_NAME})

The problem is that if I make a library with my client.cpp (using rosbuild_add_library(cliento src/client.cpp)), "cmake ." or "rosmake" tells me there is a segmentation fault or "terminate called after throwing an instance of 'St9bad_alloc' what(): std::bad_alloc " respectively. And if I do not create the library and include the sources inside the rosbuild_add_executable instruction I will get undefined references from the linking process.

May someone tell me how to properly write my CMakeLists.txt in order to use qt and ros?

I will really appreciate your help.

Ricardo

2013-02-22 15:27:15 -0500 received badge  Supporter (source)