srv / avt_vimba_camera

ROS Driver for AVT cameras using VIMBA SDK
23 stars 93 forks source link

What is the turbot_configuration in the stereo_camera_one_node.launch #15

Closed miguelriemoliveira closed 7 years ago

miguelriemoliveira commented 7 years ago

When I try to launch stereo_camera_one_node.launch with

roslaunch avt_vimba_camera stereo_camera_one_node.launch

I get this error

Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 307, in main
    p.start()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
    self._start_infrastructure()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
    self._load_config()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
    roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
    loader.load(f, config, verbose=verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 746, in load
    self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 718, in _load_launch
    self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 682, in _recurse_load
    val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
    return f(*args, **kwds)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 587, in _include_tag
    inc_filename = self.resolve_args(tag.attributes['file'].value, context)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
    return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 312, in resolve_args
    resolved = _resolve_args(resolved, context, resolve_anon, commands)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 325, in _resolve_args
    resolved = commands[command](resolved, a, args, context)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 141, in _find
    source_path_to_packages=source_path_to_packages)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 184, in _find_executable
    full_path = _get_executable_path(rp.get_path(args[0]), path)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 200, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: turbot_configurations
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/mike/ros
ROS path [2]=/home/mike/catkin_ws/src
ROS path [3]=/opt/ros/indigo/share
ROS path [4]=/opt/ros/indigo/stacks

This is because there is a "find turbot_configuration" in the launch file, i.e.,

<include file="$(find turbot_configurations)/launch/modules/stereo_pipeline.launch">
    <arg name="stereo" value="stereo_down" />

What is this and how can I install it?

Thanks,

Miguel

miquelmassot commented 7 years ago

Hi @miguelriemoliveira ! Thanks for reporting It is a series of chained launchfiles to run image_proc and image scaling. Can be swapped for stereo_image_proc as a matter of example. Let me know if it works for you now.

miguelriemoliveira commented 7 years ago

Hi Miquel,

Thanks for the quick response.

I git pull noticed that some cpp files changed also (perhaps I had a previous version).

Because of this I tried to compile again and get this error

/home/mike/catkin_ws/src/avt_vimba_camera/src/frame_observer.cpp: In member function ‘virtual void FrameObserver::FrameReceived(AVT::VmbAPI::FramePtr)’:
/home/mike/catkin_ws/src/avt_vimba_camera/src/frame_observer.cpp:52:5: error: ‘cout’ is not a member of ‘std’
     std::cout << "FrameObserver error: " << vimba_frame_ptr->GetReceiveStatus( eReceiveStatus ) << std::endl;
     ^
[ 98%] Built target trackerNodelet
[ 98%] /home/mike/catkin_ws/src/avt_vimba_camera/src/frame_observer.cpp: In member function ‘virtual void FrameObserver::FrameReceived(AVT::VmbAPI::FramePtr)’:
/home/mike/catkin_ws/src/avt_vimba_camera/src/frame_observer.cpp:52:5: error: ‘cout’ is not a member of ‘std’
     std::cout << "FrameObserver error: " << vimba_frame_ptr->GetReceiveStatus( eReceiveStatus ) << std::endl;
     ^
Built target visp_auto_tracker_cmd_line
make[2]: *** [avt_vimba_camera/CMakeFiles/stereo_camera_node.dir/src/frame_observer.cpp.o] Error 1
make[1]: *** [avt_vimba_camera/CMakeFiles/stereo_camera_node.dir/all] Error 2

Tipically, when I have this error its a

using namespace std;

missing somewhere ...

Miguel

miguelriemoliveira commented 7 years ago

I solved by adding:

#include <iostream> 

to line 37 of file avt_vimba_camera/include/avt_vimba_camera/frame_observer.h

@miquelmassot tell me if you want me to do a pull request ...

Regards,

Miguel

miguelriemoliveira commented 7 years ago

Hi @miquelmassot

My bad, I had the indigo branch.

In the kinetic branch, it compiles fine.

Regards,

Miguel

miguelriemoliveira commented 7 years ago

Hi again,

So I tested and it turn out there was a bug in the launch file bacause the stereo_camera.cpp code advertises the raw image topics on the "stereo_down" namespace. Check here

So if you change the name of the stereo namespace to something diferent from "stereo_down" it does not work.

What I did was to remap these topics in the launch file and it works, i.e.:


<launch>
<arg name="stereo" default="stereo"/>
<arg name="left_guid" default="50-0503343289"/>
<arg name="right_guid" default="50-0503343290"/>

<node ns="$(arg stereo)" name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" output="screen"/>

<node name="$(arg stereo)" pkg="avt_vimba_camera" type="stereo_camera_node" output="screen">

   <!-- Static params -->
   <param name="left_guid" value="$(arg left_guid)"/>
   <param name="right_guid" value="$(arg right_guid)"/>
   <param name="left_camera_info_url" value="file://$(find avt_vimba_camera)/calibrations/calibration_$(arg left_guid).yaml"/>
   <param name="right_camera_info_url" value="file://$(find  avt_vimba_camera)/calibrations/calibration_$(arg right_guid).yaml"/>

   <remap from="/stereo_down/left/image_raw" to="$(arg stereo)/left/image_raw"/>
   <remap from="/stereo_down/right/image_raw" to="$(arg stereo)/right/image_raw
   <param name="show_debug_prints" value="false"/>
   <!--rosparam command="load" file="$(find avt_vimba_camera)/params.yaml"/-->
</node>

</launch>

"/>