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

webcam not appearing in "rostopic list"

asked 2015-06-09 20:49:02 -0500

ryanj gravatar image

updated 2015-06-10 19:53:22 -0500

130s gravatar image

Hi everyone,

I am new to ROS and have been trying to run a camera calibration using PTAM, however I am having some issues getting the camera recognised and to appear with rostopic list.

I have followed the tutorial below, http://pharos.ece.utexas.edu/wiki/ind... however I get the following error when running rosmake usb_cam:

[ 50%] Building CXX object src/libusb_cam/CMakeFiles/usb_cam.dir/usb_cam.cpp.o
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp: In function ‘int init_mjpeg_decoder(int, int)’:
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:282:16: error: ‘avcodec_init’ was not declared in this scope
   avcodec_init();
                ^
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:292:43: error: ‘avcodec_alloc_context’ was not declared in this scope
   avcodec_context = avcodec_alloc_context();
                                           ^
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:311:44: error: ‘avcodec_open’ was not declared in this scope
   if (avcodec_open(avcodec_context, avcodec) < 0)
                                            ^
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp: In function ‘void usb_cam_camera_shutdown()’:
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:872:28: error: ‘av_free’ was not declared in this scope
     av_free(avcodec_context);
                            ^
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:876:27: error: ‘av_free’ was not declared in this scope
     av_free(avframe_camera);
                           ^
/home/mvs/rosbuild_ws/package_dir/usb_cam/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:879:24: error: ‘av_free’ was not declared in this scope
     av_free(avframe_rgb);

The missing packages are not around anymore, so is there an alternative to use?

I feel there should be a simpler way to get the a usb camera working, am I missing somthing?

Thank you, any help will be appreciated.

edit retag flag offensive close merge delete

Comments

Is there special reason why you use rosbuild and build the package from source?

BennyRe gravatar image BennyRe  ( 2015-06-10 03:56:41 -0500 )edit

Using sudo apt-get install ros-electric-bosch-drivers gives E: unable to locate package ros-electric-bosch-drivers. Unless there is somthing I am doing wrong there is no extra reason I am building from source.

ryanj gravatar image ryanj  ( 2015-06-10 06:00:29 -0500 )edit

Are you using ROS electric?

BennyRe gravatar image BennyRe  ( 2015-06-10 06:47:12 -0500 )edit

No, jade. Just tried ros-jade-bosch-drivers and did not work.

ryanj gravatar image ryanj  ( 2015-06-10 07:04:47 -0500 )edit

Yes this doesn't work. The package ros-electric-bosch-drivers is for the ROS electric distro.

BennyRe gravatar image BennyRe  ( 2015-06-10 07:22:28 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-06-10 07:23:48 -0500

BennyRe gravatar image

Simply use sudo apt-get install ros-jade-usb-cam

edit flag offensive delete link more

Comments

This has allowed me to run the tutorial, thank you! However the camera does not come up listed when running rostopic list; am I missing something? I am trying to complete this tutorial.

ryanj gravatar image ryanj  ( 2015-06-10 09:01:51 -0500 )edit

This tutorial is missing the rosrun/roslaunch part where you start the camera node. See the ROS wiki page of your package on how to launch the node.

BennyRe gravatar image BennyRe  ( 2015-06-10 09:26:15 -0500 )edit

It got rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/camera/image_raw camera:=/camera is this what you mean by starting camera node. I am having difficulty finding the ROS wiki page related to this.

ryanj gravatar image ryanj  ( 2015-06-11 07:30:21 -0500 )edit

Where you able to get it working?

krusion gravatar image krusion  ( 2016-11-01 19:16:25 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-09 20:49:02 -0500

Seen: 1,150 times

Last updated: Jun 10 '15