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

Launching usb_cam on a remote Machine

asked 2017-07-11 10:26:05 -0500

Jamrock gravatar image

updated 2017-07-11 10:32:41 -0500

gvdhoorn gravatar image

Hi ROS-Community,

as the title already says I want to Launch the usb_cam Node on a Raspberry Pi from my main Computer. Although there are many Question regarding the usb_cam not working, I can't find one that deals with the <machine> tag. :(

The Launch file works on my main Computer and the Pi locally (so i guess the param are not the problem), but if I use the <machine> tag to start it remotely i get the following error:

ERROR: cannot launch node of type [usb_cam/usb_cam_node.cpp]: usb_cam
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/opt/ros/kinetic/share
ROS path [2]=/opt/ros/kinetic/stacks

launch file:

<launch>
  <machine name="pi" address="192.168.0.48" env-loader="/opt/ros/kinetic/env.sh" user="me" default="true" />
  <node name="usb_cam_2" pkg="usb_cam" type="usb_cam_node.cpp" output="screen">
    <param name="video_device" value="/dev/video0" />
    <param name="image_width" value="1920" />
    <param name="image_height" value="1080" />
    <param name="pixel_format" value="yuyv" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap"/>
  </node>
</launch>

I think the problem lies here: env-loader="/opt/ros/kinetic/env.sh", but as I am kinda new to ROS I don't know what to do about it. :(

Greetings Jamrock

edit retag flag offensive close merge delete

Comments

Please use the Preformatted Text button next time to format console copy-pastes and code and launch files. It's the one with 101010 on it.

Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-11 10:34:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-07-11 10:34:06 -0500

gvdhoorn gravatar image
type="usb_cam_node.cpp"

I'm not saying this will resolve all your issues, but a C++ source file is not something that can be launched.

You'll want to launch the binary, ie: usb_cam_node (no .cpp).

edit flag offensive delete link more

Comments

You guessed correct, it did not change anything regarding the Error. Nevertheless i changed it and thank you for the fast answer. :)

Jamrock gravatar image Jamrock  ( 2017-07-13 09:58:21 -0500 )edit

It did not change anything? That is strange, as it should now no longer be looking for the usb_cam/usb_cam_node.cpp node.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-13 10:24:37 -0500 )edit

I really don't know why it didn't change anything, but I think it doesn't find the package at all. I tried to use the machine tag with the turtlesim_node from the tutorial on my computer and the turtle_teleop_key on the Pi. Although I couldn't move the turtle I didn't get any errors.

Jamrock gravatar image Jamrock  ( 2017-07-14 03:55:06 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-11 10:26:05 -0500

Seen: 580 times

Last updated: Jul 11 '17