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

can't locate node [individualMarkersNoKinect] in package [ar_track_alvar]

asked 2014-07-23 17:26:18 -0600

Ajay Jain gravatar image

updated 2014-07-24 10:47:25 -0600

I ran sudo apt-get install ros-hydro-ar-track-alvar, but when trying to run ar_track_alvar/individualMarkersNoKinect from a launch file, I get the error: ERROR: cannot launch node of type [ar_track_alvar/individualMarkersNoKinect]: can't locate node [individualMarkersNoKinect] in package [ar_track_alvar]. The executable is located in /opt/ros/hydro/lib/ar_track_alvar/individualMarkersNoKinect, and I can run that directly.

Doesn't work:

rosrun ar_track_alvar individualMarkersNoKinect 1.2 0.08 0.2 /camera/image_raw /camera/camera_info /camera

Doesn't work:

<launch>
    <arg name="marker_size" default="1.2" />
    <arg name="max_new_marker_error" default="0.08" />
    <arg name="max_track_error" default="0.2" />
    <arg name="cam_image_topic" default="/camera/image_raw" />
    <arg name="cam_info_topic" default="/camera/camera_info" /> 
    <arg name="output_frame" default="/camera" />


    <group ns="camera">
        <node pkg="image_proc" type="image_proc" name="image_proc" />
        <node name="uvc_camera_node" pkg="uvc_camera" type="uvc_camera_node" output="screen">
            <param name="width" type="int" value="640" />
            <param name="height" type="int" value="480" />
            <param name="fps" type="int" value="30" />
            <param name="frame" value="camera" />
            <param name="device" value="/dev/video0" />
        </node>
    </group>

    <node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkersNoKinect" respawn="false" output="screen" args="$(arg marker_size) $(arg max_new_marker_error) $(arg max_track_error) $(arg cam_image_topic) $(arg cam_info_topic) $(arg output_frame)" />
</launch>

Works from terminal if I remove the last <node name="ar_track_alvar" ...=""/> section from the launch and run the rest, but doesn't seem to successfully track marker:

/opt/ros/hydro/lib/ar_track_alvar/individualMarkersNoKinect 1.2 0.08 0.2 /camera/image_raw /camera/camera_info /camera

Output of that:

[ INFO] [1406179728.455402288]: Subscribing to info topic
[ INFO] [1406179728.471570569]: AR tracker reconfigured: ENABLED 10.00 1.20 0.08 0.20
[ INFO] [1406179729.517612651]: Subscribing to image topic

That publishes a camera to ar_marker_0 transform, but that is always

- Translation: [0.000, 0.000, 0.000]
- Rotation: in Quaternion [0.000, 0.000, 0.000, 1.000]
            in RPY [0.000, -0.000, 0.000]

regardless of the position, orientation, or presence of the tag.

My ROS_PACKAGE_PATH is /opt/ros/hydro/share:/opt/ros/hydro/stacks:/home/ajay/catkin_ws:/home/ajay/catkin_ws/src:/home/ajay/catkin_ws/src/phidgets.

Thanks!

EDIT: I initially simply installed the package with sudo apt-get install ros-hydro-ar-track-alvar. After removing that, I tried to clone the repo and compile it:

~/catkin_ws/src$ git clone -b hydro-devel https://github.com/sniekum/ar_track_alvar.git
~/catkin_ws/src$ cd ..
~/catkin_ws$ catkin_make

Catkin_make gives some errors:

CMake Error at /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
  Could not find a configuration file for package cmake_modules.

  Set cmake_modules_DIR to the directory containing a CMake configuration
  file for cmake_modules.  The file will have one of the following names:

    cmake_modulesConfig.cmake
    cmake_modules-config.cmake

Call Stack (most recent call first):
  ar_track_alvar/CMakeLists.txt:10 (find_package)


-- Eigen found (include: /usr/include/eigen3)
CMake Error at ar_track_alvar/CMakeLists.txt:28 (find_package):
  Could not find module FindTinyXML.cmake or a configuration file for package
  TinyXML.

  Adjust CMAKE_MODULE_PATH to find FindTinyXML.cmake or set TinyXML_DIR to
  the directory containing a CMake configuration file for TinyXML.  The file
  will have one of the following names:

    TinyXMLConfig.cmake
    tinyxml-config.cmake
edit retag flag offensive close merge delete

Comments

I can't reproduce this on my machine. Do you have ar_track_alvar checked out into your workspace, or did you have it in your workspace at some point in the past?

ahendrix gravatar image ahendrix  ( 2014-07-24 02:25:36 -0600 )edit

I just used apt-get install, but I've updated the question with details of compiling from source. I did clone and catkin_make before using apt-get, but had gotten the same errors and removed the ar_track_alvar package from my workspace.

Ajay Jain gravatar image Ajay Jain  ( 2014-07-24 10:48:48 -0600 )edit

So I did have it in my workspace originally, but then removed the folder and used apt-get install. I've now removed the apt package and cloned it back into my workspace.

Ajay Jain gravatar image Ajay Jain  ( 2014-07-24 10:55:51 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-07-24 13:07:42 -0600

ahendrix gravatar image

If you've had the package in your workspace in the past, it's possible that the folder or some parts of it where still in the build and devel folders of your workspace, which can confuse the package directory lookup, causing it to look in your workspace for the package executable instead of in the system installation.

From here, there are two ways to proceed:

  • Remove the package from your workspace, delete your build and devel folders to make sure there aren't any old package artifacts around, and then reinstall it from apt
  • Install the missing dependencies and build it from source. rosdep install should be able to do this for you.
edit flag offensive delete link more

Comments

I ran `rosdep install ar_track_alvar` and ran catkin_make - it worked! Now, the transform I get from ar_track_alvar is all blank (x, y, z = 0, x, y, z = 0, w = 1), but the transforms are published when I hold up the marker and stop when I put it down, so it partially works.

Ajay Jain gravatar image Ajay Jain  ( 2014-07-24 16:55:12 -0600 )edit

Get all-zero transforms is probably a separate question, but you may want to check that your camera is calibrated.

ahendrix gravatar image ahendrix  ( 2014-07-24 17:42:32 -0600 )edit

I too am getting all 0 TF's (on latest Indigo build). Have you made any progress on this?

rtoris288 gravatar image rtoris288  ( 2014-08-18 13:26:16 -0600 )edit

Get all-zero transforms is probably a separate question, but you may want to check that your camera is calibrated.

ahendrix gravatar image ahendrix  ( 2014-08-18 13:49:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-23 17:26:18 -0600

Seen: 3,436 times

Last updated: Jul 24 '14