Open henryliuliuliu opened 2 years ago
Hi, Your configuration looks fine, there should be other problems. Is there any other error message before this one? Other issues like communication failures can cause this error.
I've used default configurations with jetson nano and version ROS foxy. I'm a beginner with ROS2 I don't know the real problem, please acknowledge the problem. I don't know the real problem.
INFO] [launch]: Default logging verbosity is set to INFO [INFO] [ros2_control_node-1]: process started with pid [7383] [INFO] [robot_state_publisher-2]: process started with pid [7385] [INFO] [spawner.py-3]: process started with pid [7387] [INFO] [spawner.py-4]: process started with pid [7389] [robot_state_publisher-2] Parsing robot urdf xml string. [robot_state_publisher-2] Link link0 had 0 children [robot_state_publisher-2] [INFO] [1655720483.823214464] [robot_state_publisher]: got segment link0 [robot_state_publisher-2] [INFO] [1655720483.823509470] [robot_state_publisher]: got segment world [spawner.py-3] Traceback (most recent call last): [spawner.py-3] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 204, in <module> [spawner.py-3] sys.exit(main()) [spawner.py-3] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 123, in main [spawner.py-3] if is_controller_loaded(node, controller_manager_name, controller_name): [spawner.py-3] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 65, in is_controller_loaded [spawner.py-3] controllers = list_controllers(node, controller_manager).controller [spawner.py-3] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 49, in list_controllers [spawner.py-3] return service_caller(node, f'{controller_manager_name}/list_controllers', [spawner.py-3] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 29, in service_caller [spawner.py-3] raise RuntimeError(f'Could not contact service {service_name}') [spawner.py-3] RuntimeError: Could not contact service /controller_manager/list_controllers [spawner.py-4] Traceback (most recent call last): [spawner.py-4] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 204, in <module> [spawner.py-4] sys.exit(main()) [spawner.py-4] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 123, in main [spawner.py-4] if is_controller_loaded(node, controller_manager_name, controller_name): [spawner.py-4] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 65, in is_controller_loaded [spawner.py-4] controllers = list_controllers(node, controller_manager).controller [spawner.py-4] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 49, in list_controllers [spawner.py-4] return service_caller(node, f'{controller_manager_name}/list_controllers', [spawner.py-4] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 29, in service_caller [spawner.py-4] raise RuntimeError(f'Could not contact service {service_name}') [spawner.py-4] RuntimeError: Could not contact service /controller_manager/list_controllers [ERROR] [spawner.py-4]: process has died [pid 7389, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint0_velocity_controller -c /controller_manager --ros-args']. [ERROR] [spawner.py-3]: process has died [pid 7387, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_state_broadcaster --controller-manager /controller_manager --ros-args'].
I've used default configurations with jetson nano and version ROS foxy. I'm a beginner with ROS2 I don't know the real problem, please acknowledge the problem. I don't know the real problem.
INFO] [launch]: Default logging verbosity is set to INFO [INFO] [ros2_control_node-1]: process started with pid [7383] [INFO] [robot_state_publisher-2]: process started with pid [7385] [INFO] [spawner.py-3]: process started with pid [7387] [INFO] [spawner.py-4]: process started with pid [7389] [robot_state_publisher-2] Parsing robot urdf xml string. [robot_state_publisher-2] Link link0 had 0 children [robot_state_publisher-2] [INFO] [1655720483.823214464] [robot_state_publisher]: got segment link0 [robot_state_publisher-2] [INFO] [1655720483.823509470] [robot_state_publisher]: got segment world [spawner.py-3] Traceback (most recent call last): [spawner.py-3] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 204, in <module> [spawner.py-3] sys.exit(main()) [spawner.py-3] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 123, in main [spawner.py-3] if is_controller_loaded(node, controller_manager_name, controller_name): [spawner.py-3] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 65, in is_controller_loaded [spawner.py-3] controllers = list_controllers(node, controller_manager).controller [spawner.py-3] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 49, in list_controllers [spawner.py-3] return service_caller(node, f'{controller_manager_name}/list_controllers', [spawner.py-3] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 29, in service_caller [spawner.py-3] raise RuntimeError(f'Could not contact service {service_name}') [spawner.py-3] RuntimeError: Could not contact service /controller_manager/list_controllers [spawner.py-4] Traceback (most recent call last): [spawner.py-4] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 204, in <module> [spawner.py-4] sys.exit(main()) [spawner.py-4] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 123, in main [spawner.py-4] if is_controller_loaded(node, controller_manager_name, controller_name): [spawner.py-4] File "/opt/ros/foxy/lib/controller_manager/spawner.py", line 65, in is_controller_loaded [spawner.py-4] controllers = list_controllers(node, controller_manager).controller [spawner.py-4] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 49, in list_controllers [spawner.py-4] return service_caller(node, f'{controller_manager_name}/list_controllers', [spawner.py-4] File "/opt/ros/foxy/lib/python3.8/site-packages/controller_manager/controller_manager_services.py", line 29, in service_caller [spawner.py-4] raise RuntimeError(f'Could not contact service {service_name}') [spawner.py-4] RuntimeError: Could not contact service /controller_manager/list_controllers [ERROR] [spawner.py-4]: process has died [pid 7389, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint0_velocity_controller -c /controller_manager --ros-args']. [ERROR] [spawner.py-3]: process has died [pid 7387, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_state_broadcaster --controller-manager /controller_manager --ros-args'].
Hi @ReginaldSourn,
Just check that you have selected the correct branch, must be the same as your odrive firmware version. I had the same problem with the RPi board, after the branch change, everything works great.
Thank @rgruberski!!
the solutions Still not working. I try to dig to get some clues. For now, I have questions for @borongyuan why the spawner /controller_manager/list_controller
can't find joint_state_broadcaster? is it the bug from hardware_interface ?
Thanks for the answers @borongyuan. _My Remote is JETSONNANO and I using Ros Foxy Thanks!!!
@rgruberski you're right !! what I was missing is I changed only the Odrivetool version and branch version switching from fw-v0.5.3
to fw-v0.5.1
. I haven't changed firmware by usingodrivetool dfu
and downgrading versions of the firmware Odrive. So, to change firmware we need to go Odrive Firmware Release and then download the correct firmware matching with the branch we want to use. I am using fw-v0.5.3
firmware to upload it :
.hex
and go to the file download direction.odrivetool df ODriveFirmware_v**_***V.hex
libsub also can create trouble in compiling also please make sure we use libusb-1.0.0
not libusb-0.1-4
.
after that, we need configurations odrive hardware with python scripts before running testing axis0 spinning
.
Thank @borongyuan for giving me the answer.
@ReginaldSourn I did all the steps you mentioned, flashed the firmware, removed libusb-0.1-4 so it won't mess up with the driver yet it's not working.
What are the odrive hardware configuration you mentioned?
The first error when I run ros2 launch odrive_demo_bringup odrive_multi_interface.launch.py
is
[ros2_control_node-1] [ERROR] [1715076370.189590262] [ODriveHardwareInterface]: LIBUSB_ERROR_NO_DEVICE
full output below:
[INFO] [launch]: All log files can be found below /home/dfl-nuc/.ros/log/2024-05-07-14-06-09-950979-DFL-MOTF-22578
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ros2_control_node-1]: process started with pid [22582]
[INFO] [robot_state_publisher-2]: process started with pid [22584]
[INFO] [spawner-3]: process started with pid [22586]
[INFO] [spawner-4]: process started with pid [22588]
[robot_state_publisher-2] [INFO] [1715076370.182560119] [robot_state_publisher]: got segment link0
[robot_state_publisher-2] [INFO] [1715076370.182638221] [robot_state_publisher]: got segment world
[ros2_control_node-1] [WARN] [1715076370.186820647] [controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead.
[ros2_control_node-1] [INFO] [1715076370.186915140] [resource_manager]: Loading hardware 'odrive_ros2_control'
[ros2_control_node-1] [INFO] [1715076370.187525758] [resource_manager]: Initialize hardware 'odrive_ros2_control'
[ros2_control_node-1] [ERROR] [1715076370.189590262] [ODriveHardwareInterface]: LIBUSB_ERROR_NO_DEVICE
[ros2_control_node-1] [INFO] [1715076370.189603841] [resource_manager]: Failed to initialize hardware 'odrive_ros2_control'
[ros2_control_node-1] [WARN] [1715076370.189607697] [resource_manager]: System hardware component 'odrive_ros2_control' from plugin 'odrive_hardware_interface/ODriveHardwareInterface' failed to initialize.
[ros2_control_node-1] [WARN] [1715076370.189625666] [resource_manager]: hardware 'odrive_ros2_control' is in finalized state and can be only destroyed.
[ros2_control_node-1] [INFO] [1715076370.191904261] [controller_manager]: update rate is 100 Hz
[ros2_control_node-1] [INFO] [1715076370.191994197] [controller_manager]: RT kernel is recommended for better performance
[ros2_control_node-1] [INFO] [1715076370.402773813] [controller_manager]: Loading controller 'joint_state_broadcaster'
[ros2_control_node-1] [INFO] [1715076370.412368534] [controller_manager]: Loading controller 'joint0_velocity_controller'
[spawner-3] [INFO] [1715076370.424242899] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ros2_control_node-1] [INFO] [1715076370.424803717] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[ros2_control_node-1] [INFO] [1715076370.424905361] [joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[spawner-4] [INFO] [1715076370.434386577] [spawner_joint0_velocity_controller]: Loaded joint0_velocity_controller
[ros2_control_node-1] [ERROR] [1715076370.442102062] [joint_state_broadcaster]: None of requested interfaces exist. Controller will not run.
[ros2_control_node-1] [WARN] [1715076370.442127560] [joint_state_broadcaster]: Error occurred while doing error handling.
[ros2_control_node-1] [ERROR] [1715076370.442147261] [controller_manager]: After activation, controller 'joint_state_broadcaster' is in state 'unconfigured' (1), expected 'active' (3).
[ros2_control_node-1] [INFO] [1715076370.452367817] [controller_manager]: Configuring controller 'joint0_velocity_controller'
[spawner-3] [INFO] [1715076370.452858144] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[ros2_control_node-1] [INFO] [1715076370.453291732] [joint0_velocity_controller]: configure successful
[ros2_control_node-1] [ERROR] [1715076370.463196457] [resource_manager]: Not acceptable command interfaces combination:
[ros2_control_node-1] Start interfaces:
[ros2_control_node-1] [
[ros2_control_node-1] joint0/velocity
[ros2_control_node-1] ]
[ros2_control_node-1] Stop interfaces:
[ros2_control_node-1] [
[ros2_control_node-1] ]
[ros2_control_node-1] Not existing:
[ros2_control_node-1] [
[ros2_control_node-1] joint0/velocity
[ros2_control_node-1]
[ros2_control_node-1] [ERROR] [1715076370.463218180] [controller_manager]: Could not switch controllers since prepare command mode switch was rejected.
[spawner-4] [ERROR] [1715076370.463688470] [spawner_joint0_velocity_controller]: Failed to activate controller
[INFO] [spawner-3]: process has finished cleanly [pid 22586]
[ERROR] [spawner-4]: process has died [pid 22588, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner joint0_velocity_controller -c /controller_manager --ros-args'].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robot_state_publisher-2] [INFO] [1715076543.361967167] [rclcpp]: signal_handler(signum=2)
[ros2_control_node-1] [INFO] [1715076543.361978167] [rclcpp]: signal_handler(signum=2)
[INFO] [robot_state_publisher-2]: process has finished cleanly [pid 22584]
[INFO] [ros2_control_node-1]: process has finished cleanly [pid 22582]
My setup is ubuntu 22.04.4, Odrive 3.6 24v. FW 0.5.3
Found the solution. Odrivetool was blocking the USB port, I had to quit it so the driver can access it
THIS IS my controller.yaml file
This is my launch file
[ERROR] [ros2_control_node-1]: process has died [pid 28410, exit code -6, cmd '/opt/ros/foxy/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_0nfwf8mm --params-file /home/khadas/workspace/install/odrive_bringup/share/odrive_bringup/config/odrive_controllers.yaml']. Could any one tell me the reason why it fails?