ROS 2:電流制御モードへの対応
現状の問題点
ROS 2パッケージはサーボモータの位置制御モードにしか対応していません。
改善案
電流制御モードへ対応させるために下記のファイルに変更が必要です。
effortのコマンドインタフェースの追加
https://github.com/rt-net/crane_x7_ros/blob/3bf799a3359c14e60a3067487fb8cc88e7d79ea5/crane_x7_control/src/crane_x7_hardware.cpp#L157-L168
crane_x7_descriptionにも変更が必要です。
https://github.com/rt-net/crane_x7_description/blob/73cd53f70acb7c14a14099a77a28b7a9c2cb3fae/urdf/crane_x7.ros2_control.xacro#L47-L56
effort -> currentの変換および電流値の書き込み
https://github.com/rt-net/crane_x7_ros/blob/3bf799a3359c14e60a3067487fb8cc88e7d79ea5/crane_x7_control/src/crane_x7_hardware.cpp#L281
RT_Manipulators_library用のパラメータ変更
sync_writeとサーボモータのOperating Modeの変更
https://github.com/rt-net/crane_x7_ros/blob/3bf799a3359c14e60a3067487fb8cc88e7d79ea5/crane_x7_control/config/manipulator_config.yaml#L16-L26
コントローラの変更
どのコントローラを使用するのかはアプリケーションに依存します
https://github.com/rt-net/crane_x7_ros/blob/ros2/crane_x7_control/config/crane_x7_controllers.yaml