can't locate node [individualMarkersNoKinect] in package [ar_track_alvar]
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
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?
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.
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.