ros-industrial / ros2_canopen

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

How to mix CIA402 Drivers with other Driver types on the same bus. #284

Closed jmflpalera closed 2 months ago

jmflpalera commented 2 months ago

Hello.

Is it posible to have one io slave (cia401 for example, or my own implememtation) and two cía402 driver slaves on the same bus (can0) with ros2 canpen?. I would like to connect some field sensors to the io slave and control a differential robot vía cia402 drivers via ros2 control and canopen.

I have implemented it without connecting the io slave to the bus (on interface can0), my robot is moving well, but I need some external signals and I want to they were connected to a canopen io slave.

1) My bus.yml

options: dcf_path: "@BUS_CONFIG_PATH@"

master: node_id: 1 driver: "ros2_canopen::MasterDriver" package: "canopen_master_driver" sync_period: 10000

defaults: dcf: "cia402_slave.eds" driver: "ros2_canopen::Cia402Driver" package: "canopen_402_driver" period: 10 revision_number: 0 sdo:

nodes: left_wheel_joint: node_id: 2 right_wheel_joint: node_id: 3

2) My urdf

<?xml version="1.0"?>

canopen_ros2_control/Cia402System ${bus_config} ${master_config} ${can_interface_name} "${master_bin}" 2 3 -->

Thank you very much.

jmflpalera commented 2 months ago

Sorry I didn't see this issue before:

System of mixed proxy controllers and CiA402 controllers #206

Closed it