webcam not appearing in "rostopic list"
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.
Is there special reason why you use rosbuild and build the package from source?
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.
Are you using ROS electric?
No, jade. Just tried ros-jade-bosch-drivers and did not work.
Yes this doesn't work. The package ros-electric-bosch-drivers is for the ROS electric distro.