ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
141 stars 60 forks source link

what(): CanController: Operation not permitted #26

Closed AlessioMosca closed 2 years ago

AlessioMosca commented 2 years ago

HI there, I am trying to use the ros2_canopen package in order to make the my configuration package on my PC (ubuntu 20.04 with ros galactic). However, after each point in the guide (https://ros-industrial.github.io/ros2_canopen/) when I run the launch script, i get the following error:

[INFO] [launch]: All log files can be found below /home/drfly/.ros/log/2022-06-13-15-32-43-174646-dti-12659-717498
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [device_manager_node-1]: process started with pid [717500]
[device_manager_node-1] [INFO] [1655127163.274893720] [device_manager_node]: Found 1 devices
[device_manager_node-1] [INFO] [1655127163.275023470] [device_manager_node]: Found Master.
[device_manager_node-1] [INFO] [1655127163.275188521] [device_manager_node]: Load Library: /home/drfly/dev_ws/install/canopen_core/lib/libmaster_node.so
[device_manager_node-1] [INFO] [1655127163.275655526] [device_manager_node]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655127163.275683741] [device_manager_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655127163.277072980] [device_manager_node]: Added node of type ros2_canopen::MasterNode with name "master" for node_id 1 to executor.
[device_manager_node-1] [INFO] [1655127163.277106006] [device_manager_node]: Adding master with node id 1
[device_manager_node-1] terminate called after throwing an instance of 'std::system_error'
[device_manager_node-1]   what():  CanController: Operation not permitted
[ERROR] [device_manager_node-1]: process has died [pid 717500, exit code -6, cmd '/home/drfly/dev_ws/install/canopen_core/lib/canopen_core/device_manager_node --ros-args -r __node:=device_manager_node -r __ns:=/ --params-file /tmp/launch_params_e5ilwpr5'].

attached my configuration package

everest.zip

AlessioMosca commented 2 years ago

Hi there, I have tried to reinstall (just make a new virtual machine with ubuntu 20.04 and ros and the downloaded form github your ros package). However, I got that 4 packages had stderr:

### Starting >>> canopen_interfaces Starting >>> lely_core_libraries Finished <<< canopen_interfaces [0.60s] Starting >>> canopen_utils Finished <<< canopen_utils [0.70s] --- stderr: lely_core_libraries libtool: warning: relinking 'liblely-tap.la' libtool: warning: relinking 'liblely-util.la' libtool: warning: relinking 'liblely-can.la' libtool: warning: relinking 'liblely-co.la' libtool: warning: relinking 'liblely-io.la' libtool: warning: relinking 'liblely-ev.la' libtool: warning: relinking 'liblely-io2.la' libtool: warning: relinking 'liblely-coapp.la' --- Finished <<< lely_core_libraries [21.8s] Starting >>> canopen_core --- stderr: canopen_core /home/am/dev_ws/src/ros2_canopen/canopen_core/src/lely_master_bridge.cpp: In member function ‘std::future<bool> ros2_canopen::LelyMasterBridge::async_write_nmt(uint8_t, uint8_t)’: /home/am/dev_ws/src/ros2_canopen/canopen_core/src/lely_master_bridge.cpp:224:5: warning: no return statement in function returning non-void [-Wreturn-type] 224 | } | ^ /home/am/dev_ws/src/ros2_canopen/canopen_core/src/lely_master_bridge.cpp: In member function ‘std::future<bool> ros2_canopen::LelyMasterBridge::async_write_nmt(uint8_t, uint8_t)’: /home/am/dev_ws/src/ros2_canopen/canopen_core/src/lely_master_bridge.cpp:224:5: warning: no return statement in function returning non-void [-Wreturn-type] 224 | } | ^ --- Finished <<< canopen_core [7.75s] Starting >>> canopen_base_driver --- stderr: canopen_base_driver /home/am/dev_ws/src/ros2_canopen/canopen_base_driver/src/canopen_base_driver.cpp: In member function ‘virtual void ros2_canopen::BaseDriver::remove(lely::ev::Executor&, lely::canopen::AsyncMaster&, uint8_t)’: /home/am/dev_ws/src/ros2_canopen/canopen_base_driver/src/canopen_base_driver.cpp:61:18: warning: unused parameter ‘exec’ [-Wunused-parameter] 61 | ev::Executor & exec, | ~~~~~~~~~~~~~~~^~~~ /home/am/dev_ws/src/ros2_canopen/canopen_base_driver/src/canopen_base_driver.cpp:62:26: warning: unused parameter ‘master’ [-Wunused-parameter] 62 | canopen::AsyncMaster & master, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_base_driver/src/canopen_base_driver.cpp:63:11: warning: unused parameter ‘node_id’ [-Wunused-parameter] 63 | uint8_t node_id) noexcept | ~~~~~~~~^~~~~~~ --- Finished <<< canopen_base_driver [3.79s] Starting >>> canopen_proxy_driver Finished <<< canopen_proxy_driver [7.46s] Starting >>> canopen_402_driver --- stderr: canopen_402_driver In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:9, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:15, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/motor.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/base.hpp: In constructor ‘canopen_402::MotorBase::MotorBase(const string&)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/base.hpp:17:34: warning: unused parameter ‘name’ [-Wunused-parameter] 17 | MotorBase(const std::string &name) {} | ~~~~~~~~~~~~~~~~~~~^~~~ In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:15, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/motor.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp: In member function ‘void ros2_canopen::MCDeviceDriver::validate_objs()’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:189:28: warning: enumeration value ‘CODataUnkown’ not handled in switch [-Wswitch] 189 | switch (obj->type) | ^ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:210:28: warning: enumeration value ‘CODataUnkown’ not handled in switch [-Wswitch] 210 | switch (obj->type) | ^ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:229:24: warning: enumeration value ‘CODataUnkown’ not handled in switch [-Wswitch] 229 | switch (obj->type) | ^ In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/motor.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In member function ‘virtual bool canopen_402::Mode::setTarget(const double&)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:157:46: warning: unused parameter ‘val’ [-Wunused-parameter] 157 | virtual bool setTarget(const double &val) { return false; } | ~~~~~~~~~~~~~~^~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In member function ‘bool canopen_402::DefaultHomingMode::error(const string&)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:357:39: warning: unused parameter ‘msg’ [-Wunused-parameter] 357 | bool error(const std::string &msg) | ~~~~~~~~~~~~~~~~~~~^~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/motor.cpp: In member function ‘virtual uint16_t canopen_402::Motor402::getMode()’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/motor.cpp:296:31: warning: enumeral and non-enumeral type in conditional expression [-Wextra] 296 | return selected_mode_ ? selected_mode_->mode_id_ : MotorBase::No_Mode; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:9, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:15, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/canopen_402_driver.hpp:10, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/base.hpp: In constructor ‘canopen_402::MotorBase::MotorBase(const string&)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/base.hpp:17:34: warning: unused parameter ‘name’ [-Wunused-parameter] 17 | MotorBase(const std::string &name) {} | ~~~~~~~~~~~~~~~~~~~^~~~ In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:15, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/canopen_402_driver.hpp:10, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp: In member function ‘void ros2_canopen::MCDeviceDriver::validate_objs()’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:189:28: warning: enumeration value ‘CODataUnkown’ not handled in switch [-Wswitch] 189 | switch (obj->type) | ^ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:210:28: warning: enumeration value ‘CODataUnkown’ not handled in switch [-Wswitch] 210 | switch (obj->type) | ^ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/mc_device_driver.hpp:229:24: warning: enumeration value ‘CODataUnkown’ not handled in switch [-Wswitch] 229 | switch (obj->type) | ^ In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/canopen_402_driver.hpp:10, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In member function ‘virtual bool canopen_402::Mode::setTarget(const double&)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:157:46: warning: unused parameter ‘val’ [-Wunused-parameter] 157 | virtual bool setTarget(const double &val) { return false; } | ~~~~~~~~~~~~~~^~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In member function ‘bool canopen_402::DefaultHomingMode::error(const string&)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:357:39: warning: unused parameter ‘msg’ [-Wunused-parameter] 357 | bool error(const std::string &msg) | ~~~~~~~~~~~~~~~~~~~^~~ In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/motor.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘canopen_402::WordAccessor<MASK>& canopen_402::WordAccessor<MASK>::operator=(const uint16_t&) [with short unsigned int MASK = 624; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/motor.cpp:204:14: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:142:22: warning: unused variable ‘was’ [-Wunused-variable] 142 | uint16_t was = word_; | ^~~ In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/canopen_402_driver.hpp: In member function ‘virtual void ros2_canopen::MotionControllerDriver::on_rpdo(ros2_canopen::COData)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/canopen_402_driver.hpp:77:37: warning: unused parameter ‘data’ [-Wunused-parameter] 77 | virtual void on_rpdo(COData data) override | ~~~~~~~^~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_init(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:7:54: warning: unused parameter ‘request’ [-Wunused-parameter] 7 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_recover(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:19:54: warning: unused parameter ‘request’ [-Wunused-parameter] 19 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_halt(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:30:54: warning: unused parameter ‘request’ [-Wunused-parameter] 30 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:31:49: warning: unused parameter ‘response’ [-Wunused-parameter] 31 | std_srvs::srv::Trigger::Response::SharedPtr response) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_set_mode_position(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:40:54: warning: unused parameter ‘request’ [-Wunused-parameter] 40 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_set_mode_velocity(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:56:54: warning: unused parameter ‘request’ [-Wunused-parameter] 56 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_set_mode_cyclic_position(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:71:54: warning: unused parameter ‘request’ [-Wunused-parameter] 71 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_set_mode_cyclic_velocity(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:86:54: warning: unused parameter ‘request’ [-Wunused-parameter] 86 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp: In member function ‘void ros2_canopen::MotionControllerDriver::handle_set_mode_torque(std_srvs::srv::Trigger_Request_<std::allocator<void> >::SharedPtr, std_srvs::srv::Trigger_Response_<std::allocator<void> >::SharedPtr)’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:101:54: warning: unused parameter ‘request’ [-Wunused-parameter] 101 | const std_srvs::srv::Trigger::Request::SharedPtr request, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 10; TYPE = short int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData16; short unsigned int OBJ = 24689; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] 226 | virtual bool read(const uint16_t &sw) { return true; } | ~~~~~~~~~~~~~~~~^~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 9; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24831; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 8; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24698; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 7; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24769; unsigned char SUB = 1; short unsigned int CW_MASK = 16; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 4; TYPE = short int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData16; short unsigned int OBJ = 24689; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 3; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24831; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 2; TYPE = short int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData16; short unsigned int OBJ = 24642; unsigned char SUB = 0; short unsigned int CW_MASK = 112; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] In file included from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/canopen_402_driver.hpp:10, from /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/src/canopen_402_driver.cpp:1: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 10; TYPE = short int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData16; short unsigned int OBJ = 24689; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] 226 | virtual bool read(const uint16_t &sw) { return true; } | ~~~~~~~~~~~~~~~~^~ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 9; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24831; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 8; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24698; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 7; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24769; unsigned char SUB = 1; short unsigned int CW_MASK = 16; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 4; TYPE = short int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData16; short unsigned int OBJ = 24689; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 3; TYPE = int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData32; short unsigned int OBJ = 24831; unsigned char SUB = 0; short unsigned int CW_MASK = 0; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::read(const uint16_t&) [with short unsigned int ID = 2; TYPE = short int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData16; short unsigned int OBJ = 24642; unsigned char SUB = 0; short unsigned int CW_MASK = 112; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:226:43: warning: unused parameter ‘sw’ [-Wunused-parameter] /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp: In instantiation of ‘canopen_402::WordAccessor<MASK>& canopen_402::WordAccessor<MASK>::operator=(const uint16_t&) [with short unsigned int MASK = 624; uint16_t = short unsigned int]’: /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:231:20: required from ‘bool canopen_402::ModeForwardHelper<ID, TYPE, TPY, OBJ, SUB, CW_MASK>::write(canopen_402::Mode::OpModeAccesser&) [with short unsigned int ID = 10; TYPE = short int; ros2_canopen::CODataTypes TPY = ros2_canopen::COData16; short unsigned int OBJ = 24689; unsigned char SUB = 0; short unsigned int CW_MASK = 0; canopen_402::Mode::OpModeAccesser = canopen_402::WordAccessor<624>]’ /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:227:22: required from here /home/am/dev_ws/src/ros2_canopen/canopen_402_driver/include/canopen_402_driver/motor.hpp:142:22: warning: unused variable ‘was’ [-Wunused-variable] 142 | uint16_t was = word_; | ^~~ --- Finished <<< canopen_402_driver [9.23s] Starting >>> canopen Finished <<< canopen [0.36s] Summary: 8 packages finished [50.5s] 4 packages had stderr output: canopen_402_driver canopen_base_driver canopen_core lely_core_libraries

What should I do ?

hellantos commented 2 years ago

HI there, I am trying to use the ros2_canopen package in order to make the my configuration package on my PC (ubuntu 20.04 with ros galactic). However, after each point in the guide (https://ros-industrial.github.io/ros2_canopen/) when I run the launch script, i get the following error:

[INFO] [launch]: All log files can be found below /home/drfly/.ros/log/2022-06-13-15-32-43-174646-dti-12659-717498 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [device_manager_node-1]: process started with pid [717500] [device_manager_node-1] [INFO] [1655127163.274893720] [device_manager_node]: Found 1 devices [device_manager_node-1] [INFO] [1655127163.275023470] [device_manager_node]: Found Master. [device_manager_node-1] [INFO] [1655127163.275188521] [device_manager_node]: Load Library: /home/drfly/dev_ws/install/canopen_core/lib/libmaster_node.so [device_manager_node-1] [INFO] [1655127163.275655526] [device_manager_node]: Found class: rclcpp_components::NodeFactoryTemplate [device_manager_node-1] [INFO] [1655127163.275683741] [device_manager_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate [device_manager_node-1] [INFO] [1655127163.277072980] [device_manager_node]: Added node of type ros2_canopen::MasterNode with name "master" for node_id 1 to executor. [device_manager_node-1] [INFO] [1655127163.277106006] [device_manager_node]: Adding master with node id 1 [device_manager_node-1] terminate called after throwing an instance of 'std::system_error' [device_manager_node-1] what(): CanController: Operation not permitted [ERROR] [device_manager_node-1]: process has died [pid 717500, exit code -6, cmd '/home/drfly/dev_ws/install/canopen_core/lib/canopen_core/device_manager_node --ros-args -r node:=device_manager_node -r ns:=/ --params-file /tmp/launch_params_e5ilwpr5'].

attached my configuration package

This seems to be a problem with permissions for can0. Try running it as administrator for the moment that should solve this issue. We are working on resolving the problem.

sudo su
source install/setup.bash
ros2 launch your_package your_launch_file

This error usually occurs when lely_canopen needs to reset the txqueue size. You can try to solve this without granting root permissions to the process by using the following commands:

sudo ip link set vcan0 down
sudo ip link set vcan0 txqueuelen 1000
sudo ip link set vcan0 up
hellantos commented 2 years ago

Just some comments to the code you posted:

bus.yaml:

  sdo: # SDO executed during config
  - {index: 0x6081, sub_index: 0, value: 500000} # Set velocity
  - {index: 0x6083, sub_index: 0, value: 1000000} # Set acceleration
  - {index: 0x6083, sub_index: 0, value: 1000000} # Set deceleration
  - {index: 0x6085, sub_index: 0, value: 1000000} # Set quickstop deceleration
  - {index: 0x6098, sub_index: 0, value: 35} # Set default homing mode to 35
  - {index: 0x60C2, sub_index: 1, value: 50} # Set interpolation time for cyclic modes to 50 ms
  - {index: 0x60C2, sub_index: 2, value: -3} # Set base 10-3s

This part is at least to a degree device specific. We tested it with a steppper motor, depending on your device, this needs to be adapted.

AlessioMosca commented 2 years ago

Dear @ipa-cmh, Many thanks for the answer.

HI there, I am trying to use the ros2_canopen package in order to make the my configuration package on my PC (ubuntu 20.04 with ros galactic). However, after each point in the guide (https://ros-industrial.github.io/ros2_canopen/) when I run the launch script, i get the following error: [INFO] [launch]: All log files can be found below /home/drfly/.ros/log/2022-06-13-15-32-43-174646-dti-12659-717498 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [device_manager_node-1]: process started with pid [717500] [device_manager_node-1] [INFO] [1655127163.274893720] [device_manager_node]: Found 1 devices [device_manager_node-1] [INFO] [1655127163.275023470] [device_manager_node]: Found Master. [device_manager_node-1] [INFO] [1655127163.275188521] [device_manager_node]: Load Library: /home/drfly/dev_ws/install/canopen_core/lib/libmaster_node.so [device_manager_node-1] [INFO] [1655127163.275655526] [device_manager_node]: Found class: rclcpp_components::NodeFactoryTemplate [device_manager_node-1] [INFO] [1655127163.275683741] [device_manager_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate [device_manager_node-1] [INFO] [1655127163.277072980] [device_manager_node]: Added node of type ros2_canopen::MasterNode with name "master" for node_id 1 to executor. [device_manager_node-1] [INFO] [1655127163.277106006] [device_manager_node]: Adding master with node id 1 [device_manager_node-1] terminate called after throwing an instance of 'std::system_error' [device_manager_node-1] what(): CanController: Operation not permitted [ERROR] [device_manager_node-1]: process has died [pid 717500, exit code -6, cmd '/home/drfly/dev_ws/install/canopen_core/lib/canopen_core/device_manager_node --ros-args -r node:=device_manager_node -r ns:=/ --params-file /tmp/launch_params_e5ilwpr5']. attached my configuration package

This seems to be a problem with permissions for can0. Try running it as administrator for the moment that should solve this issue. We are working on resolving the problem.

sudo su
source install/setup.bash
ros2 launch your_package your_launch_file

This error usually occurs when lely_canopen needs to reset the txqueue size. You can try to solve this without granting root permissions to the process by using the following commands:

sudo ip link set vcan0 down
sudo ip link set vcan0 txqueuelen 1000
sudo ip link set vcan0 up

I follow your suggestion and I was able to solve the problem concerning the permision of the can0. However, a new error arises if I run the launch file by using sudo su, please see the following error:

[INFO] [launch]: All log files can be found below /root/.ros/log/2022-06-20-18-43-28-799319-dti-12659-1501168
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [device_manager_node-1]: process started with pid [1501170]
[device_manager_node-1] [INFO] [1655743408.877121786] [device_manager_node]: Found 2 devices
[device_manager_node-1] [INFO] [1655743408.877175382] [device_manager_node]: Found Master.
[device_manager_node-1] [INFO] [1655743408.877274564] [device_manager_node]: Load Library: /home/drfly/dev_ws/install/canopen_core/lib/libmaster_node.so
[device_manager_node-1] [INFO] [1655743408.877761685] [device_manager_node]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655743408.877793673] [device_manager_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655743408.879622360] [device_manager_node]: Added node of type ros2_canopen::MasterNode with name "master" for node_id 1 to executor.
[device_manager_node-1] [INFO] [1655743408.879637829] [device_manager_node]: Adding master with node id 1
[device_manager_node-1] error: /home/drfly/dev_ws/install/everest/share/everest/launch/../config/master.dcf: No such file or directory
[device_manager_node-1] error: /home/drfly/dev_ws/install/everest/share/everest/launch/../config/master.bin: No such file or directory
[device_manager_node-1] terminate called after throwing an instance of 'std::system_error'
[device_manager_node-1]   what():  Device: No such file or directory
[ERROR] [device_manager_node-1]: process has died [pid 1501170, exit code -6, cmd '/home/drfly/dev_ws/install/canopen_core/lib/canopen_core/device_manager_node --ros-args -r __node:=device_manager_node -r __ns:=/ --params-file /tmp/launch_params_b78xfbal'].
[INFO] [launch]: All log files can be found below /root/.ros/log/2022-06-20-18-43-28-799319-dti-12659-1501168
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [device_manager_node-1]: process started with pid [1501170]
[device_manager_node-1] [INFO] [1655743408.877121786] [device_manager_node]: Found 2 devices
[device_manager_node-1] [INFO] [1655743408.877175382] [device_manager_node]: Found Master.
[device_manager_node
[everest.zip](https://github.com/ros-industrial/ros2_canopen/files/8942421/everest.zip)
-1] [INFO] [1655743408.877274564] [device_manager_node]: Load Library: /home/drfly/dev_ws/install/canopen_core/lib/libmaster_node.so
[device_manager_node-1] [INFO] [1655743408.877761685] [device_manager_node]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655743408.877793673] [device_manager_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655743408.879622360] [device_manager_node]: Added node of type ros2_canopen::MasterNode with name "master" for node_id 1 to executor.
[device_manager_node-1] [INFO] [1655743408.879637829] [device_manager_node]: Adding master with node id 1
[device_manager_node-1] error: /home/drfly/dev_ws/install/everest/share/everest/launch/../config/master.dcf: No such file or directory
[device_manager_node-1] error: /home/drfly/dev_ws/install/everest/share/everest/launch/../config/master.bin: No such file or directory
[device_manager_node-1] terminate called after throwing an instance of 'std::system_error'
[device_manager_node-1]   what():  Device: No such file or directory
[ERROR] [device_manager_node-1]: process has died [pid 1501170, exit code -6, cmd '/home/drfly/dev_ws/install/canopen_core/lib/canopen_core/device_manager_node --ros-args -r __node:=device_manager_node -r __ns:=/ --params-file /tmp/launch_params_b78xfbal'].

As you can notice, it seem that the dcfgen do not generate the master.dcf file. I followed the instruction on the ros2_canopen page and as you can see from the CMakeList.txt, I added the following instruction "dcfgen(...)".

Since I was worried about the .yml and .eds I have changed both files (i just copy and paste the one that you can find in the canopen_402_driver folder ). However the results did not change.

In the previous message I forgot to write that I am using the PCAN M2 -Peak interface (https://www.peak-system.com/PCAN-M-2.473.0.html?&L=1#:~:text=The%20PCAN%2DM.,)%2C%20and%20compact%20embedded%20applications.) and I would like to ask if it is correct if I run the peak driver by following commands?

 sudo modprobe peak_pci
 sudo ip link set can0 up type can bitrate 1000000
 sudo ip link set can0 txqueuelen 1000
 sudo ip link set up can0

The ros workspace folder has the following structure:

folder

everest.zip

Many thanks for your support :)

hellantos commented 2 years ago

In the previous message I forgot to write that I am using the PCAN M2 -Peak interface (https://www.peak-system.com/PCAN-M-2.473.0.html?&L=1#:~:text=The%20PCAN%2DM.,)%2C%20and%20compact%20embedded%20applications.) and I would like to ask if it is correct if I run the peak driver by following commands?

sudo modprobe peak_pci sudo ip link set can0 up type can bitrate 1000000 sudo ip link set can0 txqueuelen 1000 sudo ip link set up can0

This looks good to me, your device seems to support 1000kbit/s.

Regarding the generation, it could be that cmake configure is not run on your package. Therefore, to generate the dcf file please try the follwing first:

colcon build --packages-select everest --cmake-clean-first --cmake-force-configure

After that check in [ros_workspace]/install/everest/share/everest/config whether the dcf file was generated. If there is no master.dcf in that folder, generation did not work using cmake, in that case, please post the build log!

You can manually generate the dcf.

AlessioMosca commented 2 years ago

Dear @ipa-cmh , many thanks for your supports.

So, I tried to follow your advice and when I run the launch script I got the following error:

root@dti-12659:/home/drfly/dev_ws# source install/setup.bash 
root@dti-12659:/home/drfly/dev_ws# ros2 launch everest bring_up.launch.py 
[INFO] [launch]: All log files can be found below /root/.ros/log/2022-06-22-11-03-11-137695-dti-12659-37469
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [device_manager_node-1]: process started with pid [37471]
[device_manager_node-1] [INFO] [1655888591.207128959] [device_manager_node]: Found 2 devices
[device_manager_node-1] [INFO] [1655888591.207239160] [device_manager_node]: Found Master.
[device_manager_node-1] [INFO] [1655888591.207341020] [device_manager_node]: Load Library: /home/drfly/dev_ws/install/canopen_core/lib/libmaster_node.so
[device_manager_node-1] [INFO] [1655888591.207780275] [device_manager_node]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655888591.207795547] [device_manager_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MasterNode>
[device_manager_node-1] [INFO] [1655888591.209337719] [device_manager_node]: Added node of type ros2_canopen::MasterNode with name "master" for node_id 1 to executor.
[device_manager_node-1] [INFO] [1655888591.209352033] [device_manager_node]: Adding master with node id 1
[device_manager_node-1] NMT: entering reset application state
[device_manager_node-1] NMT: entering reset communication state
[device_manager_node-1] NMT: running as master
[device_manager_node-1] NMT: entering pre-operational state
[device_manager_node-1] NMT: entering operational state
[device_manager_node-1] [INFO] [1655888591.223670321] [device_manager_node]: Found Driver ros2_canopen::MotionControllerDriver with lazy_load false
[device_manager_node-1] [INFO] [1655888591.223758978] [device_manager_node]: Load Library: /home/drfly/dev_ws/install/canopen_402_driver/lib/libcanopen_402_driver.so
[device_manager_node-1] [INFO] [1655888591.225951199] [device_manager_node]: Found class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MotionControllerDriver>
[device_manager_node-1] [INFO] [1655888591.225965837] [device_manager_node]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ros2_canopen::MotionControllerDriver>
[device_manager_node-1] [INFO] [1655888591.227344279] [device_manager_node]: Added node of type ros2_canopen::MotionControllerDriver with name "canopen_402_driver" for node_id 2 to executor.
[device_manager_node-1] [INFO] [1655888591.227377002] [device_manager_node]: Adding ros2_canopen::MotionControllerDriver for node id 2 to master loop.
[device_manager_node-1] [INFO] [1655888591.232034353] [device_manager_node]: List of active components:
[device_manager_node-1] [INFO] [1655888591.232053613] [device_manager_node]: 1 : /master
[device_manager_node-1] [INFO] [1655888591.232079725] [device_manager_node]: 2 : /canopen_402_driver
[device_manager_node-1] [INFO] [1655888591.232085602] [device_manager_node]: Initialisation successful.
[device_manager_node-1] warning: error writing CAN frame: Operation canceled
[device_manager_node-1] error: SDO abort code 05040000 received on upload request of object 1000 (Device type) to node 02: SDO protocol timed out
[device_manager_node-1] error: SDO abort code 05040000 received on upload request of object 1000 (Device type) to node 02: SDO protocol timed out
[device_manager_node-1] [INFO] [1655888593.232554393] [canopen_402_driver]: Intitialising Device and Objects
[device_manager_node-1] Initialised object : 6041  0 RPDO: yes TPDO: no 
[device_manager_node-1] terminate called after throwing an instance of 'lely::canopen::SdoError'
[device_manager_node-1]   what():  SubmitRead:02:6040:00: Resource not available: SDO connection (060A0023): Resource not available: SDO connection
[ERROR] [device_manager_node-1]: process has died [pid 37471, exit code -6, cmd '/home/drfly/dev_ws/install/canopen_core/lib/canopen_core/device_manager_node --ros-args -r __node:=device_manager_node -r __ns:=/ --params-file /tmp/launch_params_lx1wlyve'].

Is it normal since I have no device device connected to the can bus network (note that i am using the eds and yaml file provided in the canopen_402 package)?

Is it possible to run multiple master on the same pc ? I have equipped my pc with a PCI Canbus with 4 channel and I would like to have a master for each channel. Do you know if it is possible ?

Many thanks Best regards

Alessio

hellantos commented 2 years ago

Is it normal since I have no device device connected to the can bus network (note that i am using the eds and yaml file provided in the canopen_402 package)?

If you do not have a device connected to the CAN bus this looks correct. Basically the SDO requests for configuration are not answered and timeout.

Is it possible to run multiple master on the same pc ? I have equipped my pc with a PCI Canbus with 4 channel and I would like to have a master for each channel. Do you know if it is possible ?

It is possible, but due to alpha state of the package, we have not tested it yet. You would need to launch multiple masters (remapped to not have topic/service collisions) and have multiple configuration files, one for each channel. The nodes in the configuration files would need to have unique names.

hellantos commented 2 years ago

I'll close this issue, as the original problem seems to be solved by #29