0
$\begingroup$

Rosanswers logo

Hello All,

I installed ros-jade-usb-cam with apt-get and then made a "sudo dpkg -L ros-jade-usb-cam" which generated the following files:

/opt /opt/ros /opt/ros/jade /opt/ros/jade/include /opt/ros/jade/include/usb_cam /opt/ros/jade/include/usb_cam/usb_cam.h /opt/ros/jade/lib /opt/ros/jade/lib/libusb_cam.so /opt/ros/jade/lib/usb_cam /opt/ros/jade/lib/usb_cam/usb_cam_node /opt/ros/jade/lib/pkgconfig /opt/ros/jade/lib/pkgconfig/usb_cam.pc /opt/ros/jade/share /opt/ros/jade/share/usb_cam /opt/ros/jade/share/usb_cam/cmake /opt/ros/jade/share/usb_cam/cmake/usb_camConfig.cmake /opt/ros/jade/share/usb_cam/cmake/usb_camConfig-version.cmake /opt/ros/jade/share/usb_cam/launch /opt/ros/jade/share/usb_cam/launch/usb_cam-test.launch /opt/ros/jade/share/usb_cam/package.xml /usr /usr/share /usr/share/doc /usr/share/doc/ros-jade-usb-cam /usr/share/doc/ros-jade-usb-cam/changelog.Debian.gz

and then I launch

rosrun usb_cam usb_cam_node

and the image launches.

Where is the default .launch file, I created a usb_cam.launch file under ~/catkin_ws/devel/lib and I can launch roslaunch usb_cam.launch and it will work. (however when only I am in ~/catkin_ws/devel/lib directory.

I previously installed usb_cam on this computer from source, and everything was working fine - so the real question is:

when we install usb_cam tru ubuntu package system, where do we put the usb_cam.launch file?

Best regards, C.


Originally posted by wintermute on ROS Answers with karma: 180 on 2016-03-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It would be ugly but you could drop another launch file alongside this one:

/opt/ros/jade/share/usb_cam/launch/usb_cam-test.launch

And then roslaunch usb_cam usb_cam.launch.

https://github.com/bosch-ros-pkg/usb_cam/blob/develop/launch/usb_cam-test.launch

But really you should have a catkin package that contains your custom usb_cam.launch like catkin_ws/src/my_package/launch/usb_cam.launch, and then make sure to fill in the CMake commands to get it get installed if you are sourcing catkin_ws/install/setup.bash instead of devel/setup.bash, and then roslaunch my_package usb_cam.launch should work.


Originally posted by lucasw with karma: 8729 on 2016-03-01

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by aaditya_saraiya on 2017-08-24:
Hey Lukasw

I tried a similar command in order to achieve this result.

 source /opt/ros/kinetic/share/usb_cam/launch/usb_cam-test.launch

However, error message

 bash: /opt/ros/kinetic/share/usb_cam/launch/usb_cam-test.launch: line 1: syntax error near unexpected token 'newLine

Comment by aaditya_saraiya on 2017-08-24:
I apologize if it is a silly doubt. I am a newbie in ROS. ROS- Kinetic, Ubuntu 16.04.

Thanks in advance

Comment by lucasw on 2017-08-24:
You can't source a launch file, use roslaunch instead.

Comment by aaditya_saraiya on 2017-08-25:
Thank you so much, that works perfectly.

Just one more question. If I need to change the default camera to be an external USB camera and not my integrated webcam. what changes do I need to make?

<param name="video_device" value="/dev/video1" />

I changed the launch file this way, doesnt work.

Comment by aaditya_saraiya on 2017-08-25:
edit. It works as per this link text

However then I need to cd into the launch directory and then run roslaunch. It doesn't work if I run the command you mentioned. Any idea what could be the reason.

Thanks in advance

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.