ICube-Robotics/iiwa_ros2

impedance_controller usage

puyilin opened this issue · 4 comments

Hello, master. I want to use the impedance_controller to get some work done, so I ran command_interface:="effort" robot_controller:="impedance_controller" to load impedance_controller, but I don't know how to make the robot move with impedance_controller, could you give me some tips?

mcbed commented

Hi @puyilin, the impedance controller from this stack takes as input trajectory_msgs::msg::JointTrajectory and generates the corresponding effort based on the impedance parameters of the controller.
To make your robot move you need to publish such a trajectory message on the /proxy topic. Just be aware that the effort is proportional to the distance between your current position and the target proxy, so if the proxy is too far, high effort commands will be generated.

Hi @puyilin, the impedance controller from this stack takes as input trajectory_msgs::msg::JointTrajectory and generates the corresponding effort based on the impedance parameters of the controller. To make your robot move you need to publish such a trajectory message on the /proxy topic. Just be aware that the effort is proportional to the distance between your current position and the target proxy, so if the proxy is too far, high effort commands will be generated.

Thanks for your reply. I published the target position on /proxy topic ,it did work. I want to know could the impedance_controller be used in moveit2 like iiwa_arm_controller? I noticed iiwa_arm_controller in iiwa_description/moveit2/iiwa_controller_names.yaml and iiwa_moveit_controller_config.yaml.

mcbed commented

@puyilin, not directly as it does not interpolate trajectory setpoints. One way would be to expand the controller to support controller chaining features from ros2_control.

ok, thanks for your reply