You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hello! I'm trying to control a motor with ros2_canopen, following the tutorials "How to create..." and "canopen_tests" packages. However, after launching the launch file, the process stopped at booting the device and it responded "False" while calling the init trigger.
cmake_minimum_required(VERSION 3.8)
project(kinco_node)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(canopen REQUIRED)
find_package(canopen_core REQUIRED)
find_package(canopen_interfaces REQUIRED)
find_package(canopen_402_driver REQUIRED)
find_package(lely_core_libraries REQUIRED)
cogen_dcf(kinco_config)
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)# comment the line when this package is in a git repo and when# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()
launch output:
user@user-Default-string:canopen_ws$ ros2 launch kinco_node test1_kinco.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-11-10-10-55-44-264407-user-Default-string-34388
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [launch.user]: /home/user/workSpace/canopen_ws/install/kinco_node/share/kinco_node/config/kinco_config/bus.yml
[INFO] [launch.user]: /home/user/workSpace/canopen_ws/install/kinco_node/share/kinco_node/config/kinco_config/master.dcf
[INFO] [launch.user]:
[INFO] [launch.user]: can0
[INFO] [device_container_node-1]: process started with pid [34399]
[device_container_node-1] [INFO] [1699584944.424338068] [device_container_node]: Starting Device Container with:
[device_container_node-1] [INFO] [1699584944.424405381] [device_container_node]: master_config /home/user/workSpace/canopen_ws/install/kinco_node/share/kinco_node/config/kinco_config/master.dcf
[device_container_node-1] [INFO] [1699584944.424411566] [device_container_node]: bus_config /home/user/workSpace/canopen_ws/install/kinco_node/share/kinco_node/config/kinco_config/bus.yml
[device_container_node-1] [INFO] [1699584944.424416194] [device_container_node]: can_interface_name can0
[device_container_node-1] [INFO] [1699584944.424977999] [device_container_node]: Loading Master Configuration.
[device_container_node-1] [INFO] [1699584944.425288488] [device_container_node]: Load Library: /home/user/workSpace/canopen_ws/install/canopen_master_driver/lib/libmaster_driver.so
[device_container_node-1] [INFO] [1699584944.427277402] [device_container_node]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterDriver>
[device_container_node-1] [INFO] [1699584944.427296970] [device_container_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterDriver>
[device_container_node-1] [INFO] [1699584944.429403497] [master]: NodeCanopenBasicMaster
[device_container_node-1] [INFO] [1699584944.429489120] [device_container_node]: Load master component.
[device_container_node-1] [INFO] [1699584944.429533722] [device_container_node]: Added /master to executor
[device_container_node-1] [INFO] [1699584944.440258342] [device_container_node]: Loading Driver Configuration.
[device_container_node-1] [INFO] [1699584944.440344418] [device_container_node]: Found device joint_1 with driver ros2_canopen::Cia402Driver
[device_container_node-1] [INFO] [1699584944.440583862] [device_container_node]: Load Library: /home/user/workSpace/canopen_ws/install/canopen_402_driver/lib/libcia402_driver.so
[device_container_node-1] [INFO] [1699584944.445294062] [device_container_node]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::Cia402Driver>
[device_container_node-1] [INFO] [1699584944.445331983] [device_container_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::Cia402Driver>
[device_container_node-1] [INFO] [1699584944.447789437] [device_container_node]: Load driver component.
[device_container_node-1] [INFO] [1699584944.447871402] [device_container_node]: Added /joint_1 to executor
[device_container_node-1] [ERROR] [1699584944.457004887] [joint_1]: Could not polling from config, setting to true.
[device_container_node-1] [ERROR] [1699584944.457112020] [joint_1]: Could not read enable diagnostics from config, setting to false.
[device_container_node-1] [INFO] [1699584944.457250646] [joint_1]: scale_pos_to_dev_ 1000.000000
[device_container_node-1] scale_pos_from_dev_ 0.001000
[device_container_node-1] scale_vel_to_dev_ 1000.000000
[device_container_node-1] scale_vel_from_dev_ 0.001000
[device_container_node-1]
[device_container_node-1] [INFO] [1699584944.458165151] [joint_1]: eds file /home/user/workSpace/canopen_ws/install/kinco_node/share/kinco_node/config/kinco_config/kinco.eds
[device_container_node-1] [INFO] [1699584944.458185483] [joint_1]: bin file /home/user/workSpace/canopen_ws/install/kinco_node/share/kinco_node/config/kinco_config/joint_1.bin
[device_container_node-1] Found rpdo mapped object: index=6040 subindex=0
[device_container_node-1] Found rpdo mapped object: index=6060 subindex=0
[device_container_node-1] Found rpdo mapped object: index=6040 subindex=0
[device_container_node-1] Found rpdo mapped object: index=607a subindex=0
[device_container_node-1] Found rpdo mapped object: index=60ff subindex=0
[device_container_node-1] Found tpdo mapped object: index=6041 subindex=0
[device_container_node-1] Found tpdo mapped object: index=6061 subindex=0
[device_container_node-1] Found tpdo mapped object: index=6061 subindex=0
[device_container_node-1] Found tpdo mapped object: index=606c subindex=0
[device_container_node-1] Found tpdo mapped object: index=6077 subindex=0
[device_container_node-1] [WARN] [1699584944.461996910] [joint_1]: Wait for device to boot.
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[device_container_node-1] [INFO] [1699584971.897706201] [rclcpp]: signal_handler(signum=2)
[ERROR] [device_container_node-1]: process[device_container_node-1] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM'
[INFO] [device_container_node-1]: sending signal 'SIGTERM' to process[device_container_node-1]
[device_container_node-1] [INFO] [1699584977.425747645] [rclcpp]: signal_handler(signum=15)
[ERROR] [device_container_node-1]: process[device_container_node-1] failed to terminate '10.0' seconds after receiving 'SIGTERM', escalating to 'SIGKILL'
[INFO] [device_container_node-1]: sending signal 'SIGKILL' to process[device_container_node-1]
[ERROR] [device_container_node-1]: process has died [pid 34399, exit code -9, cmd '/home/user/workSpace/canopen_ws/install/canopen_core/lib/canopen_core/device_container_node --ros-args -r __node:=device_container_node -r __ns:=/ --params-file /tmp/launch_params_azbrn4yx --params-file /tmp/launch_params_is2xeotb --params-file /tmp/launch_params_kjf0sfkw --params-file /tmp/launch_params_zj0gunau'].
user@user-Default-string:~$ ros2 service call /joint_1/init std_srvs/srv/Trigger
requester: making request: std_srvs.srv.Trigger_Request()
response:
std_srvs.srv.Trigger_Response(success=False, message='')
Setup:
Device: PC
OS: Ubuntu 22.04.3 LTS (6.2.0-36-generic)
ROS-Distro: Humble
Branch/Commit: humble
Additional context
The output shows the ros2_canopen process read the device info by 0x1000 and 0x1018 and then it stopped. I'm a fish leg to use CANOpen and it's difficult for me to locate the problem. Any hints or suggestions?
Thanks a lot!
The text was updated successfully, but these errors were encountered:
[device_container_node-1] [WARN] [1699584944.461996910] [joint_1]: Wait for device to boot.
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
Do not interrupt with ctrl-c. when ros2_canopen get "702#00",the process will continue.
@C-002 seems there is no error happening in sdo communication. But it could be that the value of 1018sub2 in eds does not match what is actually on the device.
You can disable that check by adding product_code: 0 for the device in bus.yml.
Describe the bug
Hello! I'm trying to control a motor with ros2_canopen, following the tutorials "How to create..." and "canopen_tests" packages. However, after launching the launch file, the process stopped at booting the device and it responded "False" while calling the init trigger.
Logs
launch file:
bus yml file:
CMakeLists file:
launch output:
candump output:
init result:
Setup:
Additional context
The output shows the ros2_canopen process read the device info by 0x1000 and 0x1018 and then it stopped. I'm a fish leg to use CANOpen and it's difficult for me to locate the problem. Any hints or suggestions?
Thanks a lot!
The text was updated successfully, but these errors were encountered: