The Problem
Everything compiles smoothly, but when I launch the robot, the ros2 control node stays blocked on "wait for device to boot" and nothing follows. It happens after the master has been instantiated, so it happens during the activation of the first slave node corresponding to the first joint.
Expected behavior
I monitor the can0 bus with candump and I only get can0 701 [1] 00
While on "wait for device to boot", I run cansend can0 000#8200 and I get:
can0 000 [2] 82 00 can0 701 [1] 00 can0 733 [1] 00 can0 732 [1] 00
So I would expect to see the same command from the launch of the ros2_canopen library when instantiating the master (a reset of the communication before trying to load the slaves).
The Context
I am trying to use the ros2_canopen library to control two servo drives ingenia-NIX-10-48-C-C as part of a two joints robotic arm.
I followed the tutorial to use this library in ros2 control mode, and I set up my bus.yml accordingly.
The .eds file of the hardware can be found here: link_to_eds
Setup:
OS: Ubuntu 22.04
ROS-Distro: Humble
Branch/Commit: Humble
To Reproduce
I was able to reproduce the exact same behavior with the virtual vcan0 and the Pilz tutorial in the ros2_canopen manual.
Here are the exact steps I follow to get the same error with virtual can:
The log from here is the following.
The ros2 control node is "wait for device to boot" on the first joint, exactly as it is for my real robot.
1730279258.8199034 [INFO] [launch]: All log files can be found below /home/spacefactory5/.ros/log/2024-10-30-10-07-38-809859-spacefactory5ADS-37791
1730279258.8199837 [INFO] [launch]: Default logging verbosity is set to INFO
1730279259.7005184 [INFO] [robot_state_publisher-1]: process started with pid [37795]
1730279259.7006462 [INFO] [ros2_control_node-2]: process started with pid [37797]
1730279259.7006960 [INFO] [spawner-3]: process started with pid [37799]
1730279259.7007334 [INFO] [spawner-4]: process started with pid [37801]
1730279259.7007656 [INFO] [spawner-5]: process started with pid [37803]
1730279259.7379291 [ros2_control_node-2] [WARN] [1730279259.737610266] [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.
1730279259.7382877 [ros2_control_node-2] [INFO] [1730279259.737779725] [resource_manager]: Loading hardware 'prbt_'
1730279259.7387958 [robot_state_publisher-1] [INFO] [1730279259.738657820] [robot_state_publisher]: got segment prbt_base
1730279259.7390254 [robot_state_publisher-1] [INFO] [1730279259.738706448] [robot_state_publisher]: got segment prbt_base_link
1730279259.7390990 [robot_state_publisher-1] [INFO] [1730279259.738711379] [robot_state_publisher]: got segment prbt_flange
1730279259.7391603 [robot_state_publisher-1] [INFO] [1730279259.738714238] [robot_state_publisher]: got segment prbt_link_1
1730279259.7392194 [robot_state_publisher-1] [INFO] [1730279259.738716615] [robot_state_publisher]: got segment prbt_link_2
1730279259.7392738 [robot_state_publisher-1] [INFO] [1730279259.738718933] [robot_state_publisher]: got segment prbt_link_3
1730279259.7393293 [robot_state_publisher-1] [INFO] [1730279259.738721182] [robot_state_publisher]: got segment prbt_link_4
1730279259.7393830 [robot_state_publisher-1] [INFO] [1730279259.738723648] [robot_state_publisher]: got segment prbt_link_5
1730279259.7394361 [robot_state_publisher-1] [INFO] [1730279259.738725988] [robot_state_publisher]: got segment prbt_tool0
1730279259.7394919 [robot_state_publisher-1] [INFO] [1730279259.738728255] [robot_state_publisher]: got segment world
1730279259.7449474 [ros2_control_node-2] [INFO] [1730279259.744800638] [resource_manager]: Initialize hardware 'prbt_'
1730279259.7452121 [ros2_control_node-2] [INFO] [1730279259.744933397] [prbt__interface]: Registering hardware interface 'prbt_'
1730279259.7452812 [ros2_control_node-2] [INFO] [1730279259.744962057] [prbt__interface]: 'prbt_' has bus config: '~/ros2_canopen_test_ws/install/prbt_robot_support/share/prbt_robot_support/config/prbt/bus.yml'
1730279259.7453394 [ros2_control_node-2] [INFO] [1730279259.744965697] [prbt__interface]: 'prbt_' has master config: '~/ros2_canopen_test_ws/install/prbt_robot_support/share/prbt_robot_support/config/prbt/master.dcf'
1730279259.7453935 [ros2_control_node-2] [INFO] [1730279259.744971116] [prbt__interface]: 'prbt_' has master bin: ''
1730279259.7454457 [ros2_control_node-2] [INFO] [1730279259.744973650] [prbt__interface]: 'prbt_' has can interface: 'vcan0'
1730279259.7464330 [ros2_control_node-2] [INFO] [1730279259.746281347] [prbt_joint_1]: Node id for 'prbt_joint_1' is '3'
1730279259.7465014 [ros2_control_node-2] [INFO] [1730279259.746305317] [prbt_joint_1]: Registered position_mode '7' for 'prbt_joint_1'
1730279259.7469022 [ros2_control_node-2] [INFO] [1730279259.746799291] [prbt_joint_2]: Node id for 'prbt_joint_2' is '4'
1730279259.7469699 [ros2_control_node-2] [INFO] [1730279259.746807279] [prbt_joint_2]: Registered position_mode '7' for 'prbt_joint_2'
1730279259.7472870 [ros2_control_node-2] [INFO] [1730279259.747186581] [prbt_joint_3]: Node id for 'prbt_joint_3' is '5'
1730279259.7473516 [ros2_control_node-2] [INFO] [1730279259.747193185] [prbt_joint_3]: Registered position_mode '7' for 'prbt_joint_3'
1730279259.7476733 [ros2_control_node-2] [INFO] [1730279259.747567243] [prbt_joint_4]: Node id for 'prbt_joint_4' is '6'
1730279259.7477398 [ros2_control_node-2] [INFO] [1730279259.747574862] [prbt_joint_4]: Registered position_mode '7' for 'prbt_joint_4'
1730279259.7480450 [ros2_control_node-2] [INFO] [1730279259.747944601] [prbt_joint_5]: Node id for 'prbt_joint_5' is '7'
1730279259.7481089 [ros2_control_node-2] [INFO] [1730279259.747950739] [prbt_joint_5]: Registered position_mode '7' for 'prbt_joint_5'
1730279259.7484236 [ros2_control_node-2] [INFO] [1730279259.748324983] [prbt_joint_6]: Node id for 'prbt_joint_6' is '8'
1730279259.7484868 [ros2_control_node-2] [INFO] [1730279259.748330805] [prbt_joint_6]: Registered position_mode '7' for 'prbt_joint_6'
1730279259.7486999 [ros2_control_node-2] [INFO] [1730279259.748412938] [resource_manager]: Successful initialization of hardware 'prbt_'
1730279259.7487700 [ros2_control_node-2] [INFO] [1730279259.748556528] [resource_manager]: 'configure' hardware 'prbt_'
1730279259.7519283 [ros2_control_node-2] [INFO] [1730279259.751767662] [device_container]: Starting Device Container with:
1730279259.7520216 [ros2_control_node-2] [INFO] [1730279259.751793587] [device_container]: can_interface_name vcan0
1730279259.7520773 [ros2_control_node-2] [INFO] [1730279259.751797598] [device_container]: master_config ~/ros2_canopen_test_ws/install/prbt_robot_support/share/prbt_robot_support/config/prbt/master.dcf
1730279259.7521310 [ros2_control_node-2] [INFO] [1730279259.751802363] [device_container]: bus_config ~/ros2_canopen_test_ws/install/prbt_robot_support/share/prbt_robot_support/config/prbt/bus.yml
1730279259.7525611 [ros2_control_node-2] [INFO] [1730279259.752447527] [device_container]: Loading Master Configuration.
1730279259.7529395 [ros2_control_node-2] [INFO] [1730279259.752703486] [device_container]: Load Library: ~/ros2_canopen_test_ws/install/canopen_master_driver/lib/libmaster_driver.so
1730279259.7540939 [ros2_control_node-2] [INFO] [1730279259.753923139] [device_container]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterDriver>
1730279259.7541566 [ros2_control_node-2] [INFO] [1730279259.753933516] [device_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterDriver>
1730279259.7557971 [ros2_control_node-2] [INFO] [1730279259.755579908] [master]: NodeCanopenBasicMaster
1730279259.7558575 [ros2_control_node-2] [INFO] [1730279259.755656614] [device_container]: Load master component.
1730279259.7559757 [ros2_control_node-2] [INFO] [1730279259.755733552] [device_container]: Added /master to executor
1730279259.7570848 [ros2_control_node-2] [WARN] [1730279259.756887075] [master]: No timeout parameter found in config file. Using default value of 100ms.
1730279259.7571471 [ros2_control_node-2] [INFO] [1730279259.756908078] [master]: Master boot timeout set to 2000ms.
1730279259.7690110 [ros2_control_node-2] [INFO] [1730279259.768685278] [device_container]: Loading Driver Configuration.
1730279259.7691073 [ros2_control_node-2] [INFO] [1730279259.768761356] [device_container]: Found device prbt_joint_1 with driver ros2_canopen::Cia402Driver
1730279259.7692678 [ros2_control_node-2] [INFO] [1730279259.769025375] [device_container]: Load Library: ~/ros2_canopen_test_ws/install/canopen_402_driver/lib/libcia402_driver.so
1730279259.7696745 [ros2_control_node-2] [INFO] [1730279259.769523725] [device_container]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::Cia402Driver>
1730279259.7697356 [ros2_control_node-2] [INFO] [1730279259.769551602] [device_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::Cia402Driver>
1730279259.7716837 [ros2_control_node-2] [INFO] [1730279259.771472767] [device_container]: Load driver component.
1730279259.7717454 [ros2_control_node-2] [INFO] [1730279259.771589889] [device_container]: Added /prbt_joint_1 to executor
1730279259.7788882 [ros2_control_node-2] [INFO] [1730279259.778762861] [prbt_joint_1]: Non transmit timeout100ms
1730279259.7790580 [ros2_control_node-2] [WARN] [1730279259.778807838] [prbt_joint_1]: Could not polling from config, setting to true.
1730279259.7791061 [ros2_control_node-2] [WARN] [1730279259.778851563] [prbt_joint_1]: Could not read enable diagnostics from config, setting to false.
1730279259.7792001 [ros2_control_node-2] [INFO] [1730279259.778981470] [prbt_joint_1]: scale_pos_to_dev_ 57295.779513
1730279259.7792294 [ros2_control_node-2] scale_pos_from_dev_ 0.000017
1730279259.7792530 [ros2_control_node-2] scale_vel_to_dev_ 1000.000000
1730279259.7792735 [ros2_control_node-2] scale_vel_from_dev_ 0.001000
1730279259.7792923 [ros2_control_node-2]
1730279259.7800233 [ros2_control_node-2] [INFO] [1730279259.779944135] [prbt_joint_1]: eds file ~/ros2_canopen_test_ws/install/prbt_robot_support/share/prbt_robot_support/config/prbt/prbt_0_1.dcf
1730279259.7800689 [ros2_control_node-2] [INFO] [1730279259.779957108] [prbt_joint_1]: bin file ~/ros2_canopen_test_ws/install/prbt_robot_support/share/prbt_robot_support/config/prbt/prbt_joint_1.bin
1730279259.7823596 [ros2_control_node-2] Found rpdo mapped object: index=6040 subindex=0
1730279259.7823942 [ros2_control_node-2] Found rpdo mapped object: index=6060 subindex=0
1730279259.7824168 [ros2_control_node-2] Found rpdo mapped object: index=60c1 subindex=1
1730279259.7824373 [ros2_control_node-2] Found rpdo mapped object: index=607a subindex=0
1730279259.7824562 [ros2_control_node-2] Found rpdo mapped object: index=6081 subindex=0
1730279259.7825449 [ros2_control_node-2] Found tpdo mapped object: index=6041 subindex=0
1730279259.7825727 [ros2_control_node-2] Found tpdo mapped object: index=6061 subindex=0
1730279259.7826018 [ros2_control_node-2] Found tpdo mapped object: index=6064 subindex=0
1730279259.7826216 [ros2_control_node-2] Found tpdo mapped object: index=6064 subindex=0
1730279259.7826402 [ros2_control_node-2] Found tpdo mapped object: index=606c subindex=0
1730279259.7826586 [ros2_control_node-2] Found tpdo mapped object: index=6064 subindex=0
1730279259.7826762 [ros2_control_node-2] Found tpdo mapped object: index=606c subindex=0
1730279259.7827699 [ros2_control_node-2] [WARN] [1730279259.782516258] [prbt_joint_1]: Wait for device to boot.
1730279260.2205434 [spawner-3] [INFO] [1730279260.220274738] [spawner_joint_state_broadcaster]: waiting for service /controller_manager/list_controllers to become available...
1730279260.2208011 [spawner-5] [INFO] [1730279260.220279071] [spawner_arm_controller]: waiting for service /controller_manager/list_controllers to become available...
1730279260.2241638 [spawner-4] [INFO] [1730279260.224024318] [spawner_forward_position_controller]: waiting for service /controller_manager/list_controllers to become available...
1730279269.7703915 [INFO] [static_transform_publisher-6]: process started with pid [37915]
The full LOG when I launch the real robot is the following
--> The node is in DEBUG mode so the log is long but at the end you can see that it waits for device to boot.
1730280337.6752205 [INFO] [launch]: Default logging verbosity is set to INFO
1730280338.3186512 [INFO] [0x26_0x29C_0x131.eds'-1]: process started with pid [49554]
1730280338.3187959 [INFO] [0x26_0x29C_0x131.eds'-2]: process started with pid [49556]
1730280338.3188510 [INFO] [robot_state_publisher-3]: process started with pid [49558]
1730280338.3492930 [robot_state_publisher-3] [INFO] [1730280338.348915560] [robot2.robot_state_publisher]: got segment robot2_link_1
1730280338.3494163 [robot_state_publisher-3] [INFO] [1730280338.348990948] [robot2.robot_state_publisher]: got segment robot2_link_2
1730280338.3494551 [robot_state_publisher-3] [INFO] [1730280338.348996477] [robot2.robot_state_publisher]: got segment robot2_link_3
1730280338.3494816 [robot_state_publisher-3] [INFO] [1730280338.348999504] [robot2.robot_state_publisher]: got segment robot2_link_eeWorkbench
1730280338.3495059 [robot_state_publisher-3] [INFO] [1730280338.349002662] [robot2.robot_state_publisher]: got segment world
1730280338.5621734 [INFO] [0x26_0x29C_0x131.eds'-1]: process has finished cleanly [pid 49554]
1730280338.5623255 [INFO] [0x26_0x29C_0x131.eds'-2]: process has finished cleanly [pid 49556]
1730280340.3331895 [INFO] [ros2_control_node-4]: process started with pid [49573]
1730280340.3700795 [ros2_control_node-4] [WARN] [1730280340.369010464] [robot2.controller_manager]: 'update_rate' parameter not set, using default value.
1730280340.3701055 [ros2_control_node-4] [WARN] [1730280340.369056541] [robot2.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.
1730280340.3701334 [ros2_control_node-4] [INFO] [1730280340.369132064] [resource_manager]: Loading hardware 'robot2PositionningSystem'
1730280340.3777442 [ros2_control_node-4] [INFO] [1730280340.377490166] [resource_manager]: Initialize hardware 'robot2PositionningSystem'
1730280340.3778636 [ros2_control_node-4] [INFO] [1730280340.377619854] [robot2PositionningSystem_interface]: Registering hardware interface 'robot2PositionningSystem'
1730280340.3778977 [ros2_control_node-4] [INFO] [1730280340.377648817] [robot2PositionningSystem_interface]: 'robot2PositionningSystem' has bus config: '~/ros2_ws_canopen/install/lab_canopen_config/share/lab_canopen_config/config/canopen_demo_bus/bus.yml'
1730280340.3779254 [ros2_control_node-4] [INFO] [1730280340.377652348] [robot2PositionningSystem_interface]: 'robot2PositionningSystem' has master config: '~/ros2_ws_canopen/install/lab_canopen_config/share/lab_canopen_config/config/canopen_demo_bus/0x26_0x29C_0x131.eds'
1730280340.3779485 [ros2_control_node-4] [INFO] [1730280340.377657581] [robot2PositionningSystem_interface]: 'robot2PositionningSystem' has master bin: '~/ros2_ws_canopen/install/lab_canopen_config/share/lab_canopen_config/config/canopen_demo_bus/master.bin'
1730280340.3779738 [ros2_control_node-4] [INFO] [1730280340.377659840] [robot2PositionningSystem_interface]: 'robot2PositionningSystem' has can interface: 'can0'
1730280340.3790898 [ros2_control_node-4] [INFO] [1730280340.378954314] [robot2_joint_2_3]: Node id for 'robot2_joint_2_3' is '50'
1730280340.3797975 [ros2_control_node-4] [INFO] [1730280340.379522730] [robot2_joint_3_eeWorkbench]: Node id for 'robot2_joint_3_eeWorkbench' is '51'
1730280340.3798780 [ros2_control_node-4] [INFO] [1730280340.379624311] [resource_manager]: Successful initialization of hardware 'robot2PositionningSystem'
1730280340.3800349 [ros2_control_node-4] [INFO] [1730280340.379699694] [resource_manager]: 'configure' hardware 'robot2PositionningSystem'
1730280340.3834939 [ros2_control_node-4] [INFO] [1730280340.383349653] [robot2.device_container]: Starting Device Container with:
1730280340.3835552 [ros2_control_node-4] [INFO] [1730280340.383389223] [robot2.device_container]: can_interface_name can0
1730280340.3835955 [ros2_control_node-4] [INFO] [1730280340.383401737] [robot2.device_container]: master_config ~/ros2_ws_canopen/install/lab_canopen_config/share/lab_canopen_config/config/canopen_demo_bus/0x26_0x29C_0x131.eds
1730280340.3836222 [ros2_control_node-4] [INFO] [1730280340.383415898] [robot2.device_container]: bus_config ~/ros2_ws_canopen/install/lab_canopen_config/share/lab_canopen_config/config/canopen_demo_bus/bus.yml
1730280340.3845761 [ros2_control_node-4] [INFO] [1730280340.384259027] [robot2.device_container]: Loading Master Configuration.
1730280340.3850801 [ros2_control_node-4] [INFO] [1730280340.384900873] [robot2.device_container]: Load Library: ~/ros2_ws_canopen/install/canopen_master_driver/lib/libmaster_driver.so
1730280340.3875568 [ros2_control_node-4] [INFO] [1730280340.387306655] [robot2.device_container]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterDriver>
1730280340.3876255 [ros2_control_node-4] [INFO] [1730280340.387335488] [robot2.device_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterDriver>
1730280340.3905618 [ros2_control_node-4] [INFO] [1730280340.390114380] [robot2.master]: NodeCanopenBasicMaster
1730280340.3906918 [ros2_control_node-4] [INFO] [1730280340.390198137] [robot2.device_container]: Load master component.
1730280340.3908682 [ros2_control_node-4] [INFO] [1730280340.390277715] [robot2.device_container]: Added /robot2/master to executor
1730280340.3926640 [ros2_control_node-4] [INFO] [1730280340.391572877] [robot2.master]: Master boot timeout set to 4000ms.
1730280340.3926904 [ros2_control_node-4] [DEBUG] [1730280340.391578607] [robot2.master]: NodeCanopenMaster activate start
1730280340.4004045 [ros2_control_node-4] [DEBUG] [1730280340.400089219] [robot2.master]: NodeCanopenMaster activate end
1730280340.4005306 [ros2_control_node-4] [INFO] [1730280340.400170934] [robot2.device_container]: Loading Driver Configuration.
1730280340.4005737 [ros2_control_node-4] [INFO] [1730280340.400240701] [robot2.device_container]: Found device robot2_joint_2_3 with driver ros2_canopen::Cia402Driver
1730280340.4007976 [ros2_control_node-4] [INFO] [1730280340.400647878] [robot2.device_container]: Load Library: ~/ros2_ws_canopen/install/canopen_402_driver/lib/libcia402_driver.so
1730280340.4015565 [ros2_control_node-4] [INFO] [1730280340.401292004] [robot2.device_container]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::Cia402Driver>
1730280340.4016411 [ros2_control_node-4] [INFO] [1730280340.401307097] [robot2.device_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::Cia402Driver>
1730280340.4016805 [ros2_control_node-4] [DEBUG] [1730280340.401360459] [rcl]: Arg 1 (-r) is not a --param nor a -p flag.
1730280340.4017088 [ros2_control_node-4] [DEBUG] [1730280340.401369189] [rcl]: Got remap rule : __ns:=/robot2
1730280340.4017339 [ros2_control_node-4]
1730280340.4017577 [ros2_control_node-4] [DEBUG] [1730280340.401372397] [rcl]: Arg 4 (-r) is not a --param nor a -p flag.
1730280340.4017813 [ros2_control_node-4] [DEBUG] [1730280340.401375736] [rcl]: Got remap rule : __node:=robot2_joint_2_3
1730280340.4018042 [ros2_control_node-4]
1730280340.4018269 [ros2_control_node-4] [DEBUG] [1730280340.401382626] [rcl]: Initializing node 'canopen_driver' in namespace ''
1730280340.4018509 [ros2_control_node-4] [DEBUG] [1730280340.401392764] [rcl]: Using domain ID of '26'
1730280340.4020026 [ros2_control_node-4] [DEBUG] [1730280340.401458607] [rcl]: Initializing publisher for topic name '/rosout'
1730280340.4020441 [ros2_control_node-4] [DEBUG] [1730280340.401465720] [rcl]: Expanded and remapped topic name '/rosout'
1730280340.4021618 [ros2_control_node-4] [DEBUG] [1730280340.401666737] [rcl]: Publisher initialized
1730280340.4021986 [ros2_control_node-4] [DEBUG] [1730280340.401672277] [rcl]: Node initialized
1730280340.4044678 [ros2_control_node-4] [INFO] [1730280340.403730755] [robot2.device_container]: Load driver component.
1730280340.4044914 [ros2_control_node-4] [INFO] [1730280340.403855392] [robot2.device_container]: Added /robot2/robot2_joint_2_3 to executor
1730280340.4045658 [ros2_control_node-4] [DEBUG] [1730280340.403884421] [robot2.robot2_joint_2_3]: init_start
1730280340.4120541 [ros2_control_node-4] [INFO] [1730280340.411915004] [robot2.robot2_joint_2_3]: Non transmit timeout100ms
1730280340.4121158 [ros2_control_node-4] [WARN] [1730280340.411948952] [robot2.robot2_joint_2_3]: Could not polling from config, setting to true.
1730280340.4122367 [ros2_control_node-4] [WARN] [1730280340.411998673] [robot2.robot2_joint_2_3]: Could not read period from config, setting to 10ms
1730280340.4122767 [ros2_control_node-4] [WARN] [1730280340.412017419] [robot2.robot2_joint_2_3]: Could not read enable diagnostics from config, setting to false.
1730280340.4123020 [ros2_control_node-4] [INFO] [1730280340.412130357] [robot2.robot2_joint_2_3]: scale_pos_to_dev_ 1000.000000
1730280340.4123249 [ros2_control_node-4] scale_pos_from_dev_ 0.001000
1730280340.4123464 [ros2_control_node-4] scale_vel_to_dev_ 1000.000000
1730280340.4123662 [ros2_control_node-4] scale_vel_from_dev_ 0.001000
1730280340.4123855 [ros2_control_node-4]
1730280340.4124055 [ros2_control_node-4] [DEBUG] [1730280340.412141655] [robot2.robot2_joint_2_3]: configure_end
1730280340.4124250 [ros2_control_node-4] [DEBUG] [1730280340.412150445] [robot2.robot2_joint_2_3]: demand_set_master_start
1730280340.4133835 [ros2_control_node-4] [DEBUG] [1730280340.413176220] [robot2.robot2_joint_2_3]: demand_set_master end
1730280340.4134111 [ros2_control_node-4] [DEBUG] [1730280340.413240425] [robot2.robot2_joint_2_3]: activate_start
1730280340.4134340 [ros2_control_node-4] [INFO] [1730280340.413247020] [robot2.robot2_joint_2_3]: eds file ~/ros2_ws_canopen/install/lab_canopen_config/share/lab_canopen_config/config/canopen_demo_bus/0x26_0x29C_0x131.eds
1730280340.4134560 [ros2_control_node-4] [INFO] [1730280340.413251420] [robot2.robot2_joint_2_3]: bin file ~/ros2_ws_canopen/install/lab_canopen_config/share/lab_canopen_config/config/canopen_demo_bus/robot2_joint_2_3.bin
1730280340.4206979 [ros2_control_node-4] Found rpdo mapped object: index=6040 subindex=0
1730280340.4207690 [ros2_control_node-4] Found rpdo mapped object: index=6040 subindex=0
1730280340.4208031 [ros2_control_node-4] Found rpdo mapped object: index=6060 subindex=0
1730280340.4208295 [ros2_control_node-4] Found rpdo mapped object: index=6040 subindex=0
1730280340.4208527 [ros2_control_node-4] Found rpdo mapped object: index=607a subindex=0
1730280340.4208808 [ros2_control_node-4] Found rpdo mapped object: index=6040 subindex=0
1730280340.4209030 [ros2_control_node-4] Found rpdo mapped object: index=60ff subindex=0
1730280340.4210589 [ros2_control_node-4] Found tpdo mapped object: index=6064 subindex=0
1730280340.4210985 [ros2_control_node-4] Found tpdo mapped object: index=606c subindex=0
1730280340.4211254 [ros2_control_node-4] Found tpdo mapped object: index=6041 subindex=0
1730280340.4211495 [ros2_control_node-4] Found tpdo mapped object: index=603f subindex=0
1730280340.4211721 [ros2_control_node-4] Found tpdo mapped object: index=6061 subindex=0
1730280340.4211931 [ros2_control_node-4] Found tpdo mapped object: index=6077 subindex=0
1730280340.4212136 [ros2_control_node-4] Found tpdo mapped object: index=2601 subindex=1
1730280340.4212368 [ros2_control_node-4] Found tpdo mapped object: index=2a03 subindex=0
1730280340.4212570 [ros2_control_node-4] Found tpdo mapped object: index=2611 subindex=1
1730280340.4212775 [ros2_control_node-4] Found tpdo mapped object: index=2611 subindex=2
1730280340.4212990 [ros2_control_node-4] Found tpdo mapped object: index=2601 subindex=2
1730280340.4213920 [ros2_control_node-4] [WARN] [1730280340.420874995] [robot2.robot2_joint_2_3]: Wait for device to boot.
The Problem Everything compiles smoothly, but when I launch the robot, the ros2 control node stays blocked on "wait for device to boot" and nothing follows. It happens after the master has been instantiated, so it happens during the activation of the first slave node corresponding to the first joint.
Expected behavior I monitor the can0 bus with candump and I only get
can0 701 [1] 00
While on "wait for device to boot", I runcansend can0 000#8200
and I get:can0 000 [2] 82 00 can0 701 [1] 00 can0 733 [1] 00 can0 732 [1] 00
So I would expect to see the same command from the launch of the ros2_canopen library when instantiating the master (a reset of the communication before trying to load the slaves).The Context I am trying to use the ros2_canopen library to control two servo drives ingenia-NIX-10-48-C-C as part of a two joints robotic arm. I followed the tutorial to use this library in ros2 control mode, and I set up my bus.yml accordingly. The .eds file of the hardware can be found here: link_to_eds
Setup:
To Reproduce I was able to reproduce the exact same behavior with the virtual vcan0 and the Pilz tutorial in the ros2_canopen manual. Here are the exact steps I follow to get the same error with virtual can:
mkdir ~/ros2_canopen_ws/src
cd ~/ros2_canopen_ws/src
git clone git@github.com:ros-industrial/ros2_canopen.git
git clone git@github.com:hellantos/prbt_robot.git
cd ros2_canopen
git checkout humble
cd ../../
colcon build
source install/setup.bash
ros2 launch prbt_robot_moveit_config moveit_planning_execution.launch.py can_interface_name:=vcan0
The log from here is the following. The ros2 control node is "wait for device to boot" on the first joint, exactly as it is for my real robot.
The full LOG when I launch the real robot is the following --> The node is in DEBUG mode so the log is long but at the end you can see that it waits for device to boot.