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

Error while building project in QT

asked 2013-12-01 18:25:47 -0500

Bindu gravatar image

updated 2013-12-01 18:32:20 -0500

I want to work in ROS with QTCreator. I have to packages A and B in ros workspace. its location is /home/it/Desktop/rosspace/sandbox/A and /home/it/Desktop/rosspace/sandbox/B.

my environment variables are

 declare -x ROSLISP_PACKAGE_DIRECTORY="/opt/ros/fuerte/share/common-lisp/ros"
 declare -x ROS_DISTRO="fuerte"
 declare -x ROS_ETC_DIR="/opt/ros/fuerte/etc/ros"
 declare -x ROS_MASTER_URI="http://localhost:11311"
 declare -x ROS_PACKAGE_PATH="/home/it/Desktop/gps/sandbox/gps_sub:/home/it/Desktop/rosspace/sandbox:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros"
 declare -x ROS_ROOT="/opt/ros/fuerte/share/ros"
 declare -x ROS_WORKSPACE="/home/it/Desktop/rosspace"

I have written this to ./bashrc

 source /home/mit/Desktop/rosspace/setup.bash 
 export ROS_PACKAGE_PATH=/home/it/Desktop/rosspace/sandbox:$ROS_PACKAGE_PATH

I opened QTCreator from terminal.

then open file or project->/home/it/Desktop/rosspace/sandbox/A/cmakelist.text

after choosing qt build directory and running cmake

i got following error:

  CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/private.cmake:99 (message):
  [rosbuild] rospack found package "A" at "", but the
  current directory is
  "/home/it/Desktop/rosspace/sandbox/A".  You should
  double-check your ROS_PACKAGE_PATH to ensure that packages are found in the
  correct precedence order.
  Call Stack (most recent call first):
  /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:177(_rosbuild_check_package_location)
  CMakeLists.txt:12 (rosbuild_init)


  [rosbuild] Building package A

please help me to open my project in QT

I am using Ubuntu 12.04, QTCreator latest version and ROS-Fuerte

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-12-06 02:16:08 -0500

autonomy gravatar image

My guess is that there's a problem due to multiple includes of your sandbox directory in ROS_PACKAGE_PATH. You're doing this:

 declare -x ROS_PACKAGE_PATH="/home/it/Desktop/gps/sandbox/gps_sub:/home/it/Desktop/rosspace/sandbox:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros"

then

export ROS_PACKAGE_PATH=/home/it/Desktop/rosspace/sandbox:$ROS_PACKAGE_PATH

The only thing you need to do is this:

export ROS_PACKAGE_PATH=/home/it/Desktop/rosspace/sandbox:$ROS_PACKAGE_PATH

Are you also sourcing the /opt/ros/fuerte/setup.bash script or do you have your own in /home/mit/Desktop/rosspace/setup.bash? I suggest you simplify things by sourcing 1 script and doing either declarations or exports of your variables, not both as you're currently doing for ROS_PACKAGE_PATH

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-12-01 18:25:47 -0500

Seen: 233 times

Last updated: Dec 06 '13