lbr-stack / lbr_fri_ros2_stack

ROS 2 integration for KUKA LBR IIWA 7/14 and Med 7/14
https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_fri_ros2_stack/doc/lbr_fri_ros2_stack.html
Apache License 2.0
155 stars 48 forks source link

Impedence control #217

Open zzrobot1979 opened 3 weeks ago

zzrobot1979 commented 3 weeks ago

Hello: I would like to know whether impedance control can be achieved in this project, or can it be achieved directly using the wrench method?

mhubii commented 3 weeks ago

hi @zzrobot1979, yes, you can do impedance control. In impedance control, do you wish to control positions or torques?

zzrobot1979 commented 3 weeks ago

Thank you very much for your reply! I want to make the end of my kuka robot arm move smoothly along a certain space vector under a constant contact force. Maybe I should control the speed and force/torque of the end of the robot arm at the same time?

mhubii commented 3 weeks ago

hope this demo gets you up to speed:

https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_demos/lbr_demos_py/doc/lbr_demos_py.html#lbr-wrench-command-controller-hardware-only

but essentially when running

ros2 launch lbr_bringup hardware.launch.py \
    ctrl:=lbr_wrench_command_controller \
    model:=iiwa7 # [iiwa7, iiwa14, med7, med14]

this loads a ros2_controller lets you command joint positions and a target end-effector wrench (force/torque). Note: when a tool is connected to you end-effector, then you need to calibrate the mass first.

This is not ideal yet, as it would be easier to chain controllers #115, which isn't implemented yet.

zzrobot1979 commented 3 weeks ago

Thank you very much for your reminder! I would like to know how to calibrate the quality of the end effector of the robot arm? Is this process configured in sunrise or can it be done by changing some parameters of this project?

zzrobot1979 commented 3 weeks ago

Another question is: how to realize the movement of the robot in lbr_demos/lbr_demos_py/lbr_demos_py/wrench_sine_overlay.py? Is it controlled by the line of code self._lbr_wrench_command.joint_position = deepcopy( self._lbr_state.measured_joint_position )? How to pass a position in space to the robot? Thank you very much!

mhubii commented 3 weeks ago

Thank you very much for your reminder! I would like to know how to calibrate the quality of the end effector of the robot arm? Is this process configured in sunrise or can it be done by changing some parameters of this project?

yes, the load data calibration needs to be done on the smart pad, can try to provide some instructions

Another question is: how to realize the movement of the robot in lbr_demos/lbr_demos_py/lbr_demos_py/wrench_sine_overlay.py? Is it controlled by the line of code self._lbr_wrench_command.joint_position = deepcopy( self._lbr_state.measured_joint_position )? How to pass a position in space to the robot? Thank you very much!

that's correct. The target joint position is set exactly there (self._lbr_wrench_command.joint_position). If you wish to command some end-effector velocity, you'd have to do the kinematics yourself currently.