yoshito-n-students / usb_cam_hardware

USB camera driver based on ros_control
MIT License
27 stars 8 forks source link

Failed to load nodelet #1

Open chanun3571 opened 1 year ago

chanun3571 commented 1 year ago

Hello. I wanted to try the program so I tried with this command "roslaunch usb_cam_hardware example_h264.launch". However, there is an error.

[ERROR] [1665849456.978268509]: Failed to load nodelet [/usb_cam/hardware] of type [usb_cam_hardware/USBCamHardware] even after refreshing the cache: Could not find library corresponding to plugin usb_cam_hardware/USBCamHardware. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [ERROR] [1665849456.979934963]: The error before refreshing the cache was: Could not find library corresponding to plugin usb_cam_hardware/USBCamHardware. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [usb_cam/hardware-1] process has died [pid 8905, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet standalone usb_cam_hardware/USBCamHardware camera_info_controller/camera_info:=camera_info h264_controller/image:=image compressed_packet_controller/packet:=packet/h264 name:=hardware log:=/home/chanun3571/.ros/log/911fe4ba-4ca1-11ed-8657-5b44d1af69e6/usb_cam-hardware-1.log]. log file: /home/chanun3571/.ros/log/911fe4ba-4ca1-11ed-8657-5b44d1af69e6/usb_cam-hardware-1*.log

Anyone know how to solve this?

yoshito-okada commented 1 year ago

Did you run catkin_make before roslaunch? Which OS and ROS version are you using? Why don't you use released version via apt get? Please post all commands you run to reproduce the problem.

chanun3571 commented 1 year ago

Hello, thank you for your reply. My OS is Ubutu20.04 with ROS Noetic. I "git clone" the whole package into ~/opt/ros/noetic/share/. Then I used "roslaunch usb_cam_hardware example_h264.launch" in terminal.

chanun3571 commented 1 year ago

I tried the "sudo apt install ros-noetic-usb-cam-hardware". With this command only the usb_cam_hardware_interface folder are installed.

chanun3571 commented 1 year ago

" roslaunch usb_cam_hardware example_h264.launch"

... logging to /home/ubuntu/.ros/log/e0c0371a-4ddf-11ed-a4f7-a3814d83286d/roslaunch-ubuntu-12460.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:46041/

SUMMARY

PARAMETERS

NODES /usb_cam/ controller_starter (controller_manager/controller_manager) hardware (nodelet/nodelet)

auto-starting new master process[master]: started with pid [12468] ROS_MASTER_URI=http://localhost:11311

setting /run_id to e0c0371a-4ddf-11ed-a4f7-a3814d83286d process[rosout-1]: started with pid [12478] started core service [/rosout] process[usb_cam/hardware-2]: started with pid [12485] process[usb_cam/controller_starter-3]: started with pid [12486] type is usb_cam_hardware/USBCamHardware [ERROR] [1665985948.401790221]: Cannot set format [ERROR] [1665985948.405647296]: Cannot init usb cam hardware [ERROR] [1665985948.406126905]: Cannot stop streaming [usb_cam/hardware-2] process has died [pid 12485, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet standalone usb_cam_hardware/USBCamHardware camera_info_controller/camera_info:=camera_info h264_controller/image:=image compressed_packet_controller/packet:=packet/h264 name:=hardware log:=/home/ubuntu/.ros/log/e0c0371a-4ddf-11ed-a4f7-a3814d83286d/usb_cam-hardware-2.log]. log file: /home/ubuntu/.ros/log/e0c0371a-4ddf-11ed-a4f7-a3814d83286d/usb_cam-hardware-2*.log

yoshito-okada commented 1 year ago

Your log says the USBCamHardware is successfully loaded. It looks not an issue with the package but your environment. Perhaps, no camera is physically connected, the path to the camera is wrong, or the camera does not support h264 streaming. Unfortunately, I cannot support you anymore as the problem is with your environment. Good luck!

chanun3571 commented 1 year ago

Does this package "usb_cam_hardware" requires any dependencies? Do I need to have"usb_cam" or "ros_control"?

chanun3571 commented 1 year ago

Because when I solve the above error. I got a new error.

"roslaunch usb_cam_hardware example_mjpeg.launch" ... logging to /home/ubuntu/.ros/log/5b834a2a-4ded-11ed-83c1-f7200f64fcde/roslaunch-ubuntu-2390.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:43809/

SUMMARY

PARAMETERS

NODES /usb_cam/ controller_starter (controller_manager/controller_manager) hardware (nodelet/nodelet)

auto-starting new master process[master]: started with pid [2398] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 5b834a2a-4ded-11ed-83c1-f7200f64fcde process[rosout-1]: started with pid [2408] started core service [/rosout] process[usb_cam/hardware-2]: started with pid [2415] process[usb_cam/controller_starter-3]: started with pid [2416] type is usb_cam_hardware/USBCamHardware [ERROR] [1665991746.366360975]: Could not load class 'usb_cam_controllers/CameraInfoController': Could not find library corresponding to plugin usb_cam_controllers/CameraInfoController. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [ERROR] [1665991746.369844116]: Could not load controller 'camera_info_controller' because controller type 'usb_cam_controllers/CameraInfoController' does not exist. [ERROR] [1665991746.369975951]: Use 'rosservice call controller_manager/list_controller_types' to get the available types Error when loading 'camera_info_controller' [ERROR] [1665991746.389974900]: Could not load class 'usb_cam_controllers/CompressedPacketController': Could not find library corresponding to plugin usb_cam_controllers/CompressedPacketController. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [ERROR] [1665991746.390116605]: Could not load controller 'compressed_packet_controller' because controller type 'usb_cam_controllers/CompressedPacketController' does not exist. [ERROR] [1665991746.390175013]: Use 'rosservice call controller_manager/list_controller_types' to get the available types Error when loading 'compressed_packet_controller' [ERROR] [1665991746.408310890]: Could not load class 'usb_cam_controllers/MjpegController': Could not find library corresponding to plugin usb_cam_controllers/MjpegController. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [ERROR] [1665991746.408433891]: Could not load controller 'mjpeg_controller' because controller type 'usb_cam_controllers/MjpegController' does not exist. [ERROR] [1665991746.408491540]: Use 'rosservice call controller_manager/list_controller_types' to get the available types Error when loading 'mjpeg_controller' [ERROR] [1665991746.430931658]: Could not start controller with name 'camera_info_controller' because no controller with this name exists Error when starting ['camera_info_controller'] and stopping [] [ERROR] [1665991746.449771042]: Could not start controller with name 'compressed_packet_controller' because no controller with this name exists Error when starting ['compressed_packet_controller'] and stopping [] [ERROR] [1665991746.477018813]: Could not start controller with name 'mjpeg_controller' because no controller with this name exists Error when starting ['mjpeg_controller'] and stopping [] [usb_cam/controller_starter-3] process has finished cleanly log file: /home/ubuntu/.ros/log/5b834a2a-4ded-11ed-83c1-f7200f64fcde/usb_cam-controller_starter-3*.log

yoshito-okada commented 1 year ago

You might better use usb_cam package instead of this package. Both functionalities are basically the same, although usb_cam_hardware is much lighter in some conditions. As you guessed, the usb_cam_hardware package is based on ros_control, which requires a steep learning curve. If you are a beginner, usb_cam is easier to use.

chanun3571 commented 1 year ago

Thank you for your recommendation. However, I need to use a lighter package for my camera application. Would you mind helping me out to fix the above error? Thank you for your help.

yoshito-okada commented 1 year ago

I strongly recommend trying the usb_cam first. Once you read out images from a camera using the usb_cam and it is too heavy for your requierment, then try this package again. The configuration parameters of both packages are similar. Successful parameters of the usb_cam must be useful to the usb_cam_hardware and make debugging of your environment with the usb_cam_hardware easier.

chanun3571 commented 1 year ago

I have tried usb_cam and it works very well. However, it is too heavy so I planned to change to usb_cam_hardware.

yoshito-okada commented 1 year ago

Installing usb_cam_controller package may help.

chanun3571 commented 1 year ago

Did you mean "usb_cam_controllers"? I already git clone the whole usb_cam_hardware package. Capture1234

yoshito-okada commented 1 year ago

Then I have no idea.