ros-industrial / ros2_canopen

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

Add generic system interface for ros2_control #33

Closed destogl closed 2 years ago

destogl commented 2 years ago

This is a overview PR with integration of ros2_canopen and ros2_control. The PR will be divided into smaller PR to make review easier. Concrete PR will be referenced below.

hellantos commented 2 years ago

Regarding the state machine matching I would propose the following: image

Activating should call handleInit(). This will put the motion controller into Operation Enabled state and executed the configured homing sequence. Then it should call enterModeAndWait(MotorBase::??) with ?? either No_Mode or the Mode user configured during Inactive.

Deactivating should set call enterModeAndWait(MotorBase::No_Mode) and then handleShutdown().

In this, we do not use QuickStop which is usually used for stopping the device during operation fast. This does only Stop the movement and usually slam in the breaks. It does not disable torque. I am not sure, how this would be integrated into the ros2_control interface.

hellantos commented 2 years ago

There is some major restructuring being done in #34. After some analysis, it seems that it is easier to rebase this PR onto #34. It is mainly a renaming and CMakeLists.txt merge issue.

This is the result of the rebase, if possible please check: https://github.com/ipa-cmh/ros2_canopen/tree/canopen-system-interface

I am planning to do tidy up the device interface as well, but I will wait until this PR is merged.

destogl commented 2 years ago

@livanov93 do we need all of those *.dcf files?

Can you also check if all the tests are running?

hellantos commented 2 years ago

This PR breaks compatability with foxy and galactic, as far as I can see. I suppose there is no way of having them supported easily. For me this means, we I need to split of foxy and galactic support into a seperate branch.

livanov93 commented 2 years ago

This PR breaks compatability with foxy and galactic, as far as I can see. I suppose there is no way of having them supported easily. For me this means, we I need to split of foxy and galactic support into a seperate branch.

We will need split branches for separate ROS_DISTROs because the same approach is used in ros2_control.

borongyuan commented 2 years ago

This PR breaks compatability with foxy and galactic, as far as I can see. I suppose there is no way of having them supported easily. For me this means, we I need to split of foxy and galactic support into a seperate branch.

We will need split branches for separate ROS_DISTROs because the same approach is used in ros2_control.

This is reasonable. How to migrate Hardware Components from Foxy to Galactic is explained here.

hellantos commented 2 years ago

Alright. I have create seperate branches for foxy, galactic, humble. I'd host rolling in master. I have reserved some lab time tomorrow morning for testing this with a the trinamic pd42 device and maybe the prbt.

hellantos commented 2 years ago

@livanov93 @destogl I would be okay with only supporting ros2_control in humble onwards. Foxy is EOL in about 8 month and Galactic in November anyways.

destogl commented 2 years ago

nly supporting ros2_control in humble onwards. Foxy is EOL in about 8 month and Galactic in November anyways.

yes of course! This saves us some time for sure.

hellantos commented 2 years ago

@destogl @livanov93 Finished tests and did some updates to integrate better with the current launch infrastructure. You can find a few changes in https://github.com/StoglRobotics-forks/ros2_canopen/pull/6

livanov93 commented 2 years ago

@destogl @livanov93 Finished tests and did some updates to integrate better with the current launch infrastructure. You can find a few changes in StoglRobotics-forks#6

@ipa-cmh I did part of that in the ros-industrial/ros2_canopen@02c7090. Can you rebase in StoglRobotics-forks/ros2_canopen#6?

hellantos commented 2 years ago

@livanov93 done. basically this moves testing specific device files into the canopen_tests folder.

destogl commented 2 years ago

@ipa-cmh @livanov93 I have added a short documentation about testing this interface.

To no longer block this PR I will add a longer documentation into a separate PR (page: https://ros-industrial.github.io/ros2_canopen/system-interface.html) in the next day or two.

I propose to merge this.

jclinton830 commented 1 year ago

Hi! Are there any plans on adding detailed documentation or a user guide on how to use this ROS2 control system interface feature? @ipa-cmh

I have checked the official documentation provided but it seems to be empty for now. https://ros-industrial.github.io/ros2_canopen/manual/user-guide/operation/ros2-control-interface.html