fzi-forschungszentrum-informatik / cartesian_controllers

A set of Cartesian controllers for the ROS1 and ROS2-control framework.
BSD 3-Clause "New" or "Revised" License
351 stars 100 forks source link

Possible bug in cartesian_force_controller. #200

Closed yuweiDu closed 3 weeks ago

yuweiDu commented 1 month ago

Hi @stefanscherzinger Nice work and it helps me save a lot of time. When I went through the source code, I am not sure if it is a error here https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers/blob/82883cb63beb06eb5c09115f996da438f1f65449/cartesian_force_controller/include/cartesian_force_controller/cartesian_force_controller.hpp#L189 I think it should be `return - Base::displayInBaseLink(m_ft_sensor_wrench,m_new_ft_sensor_ref)

I also did a test. I pub taget_wrench:x = 2.0 and then pub /my_cartesian_force_controller/ft_sensor_wrench x=2.0. After I pub the taget_wrench, the EE moved in -x direction and the robot should stop after I pub /my_cartesian_force_controller/ft_sensor_wrench x=2.0 but it didn't. I changed the source code as I suggested and the robot stopped after I pub /my_cartesian_force_controller/ft_sensor_wrench x=2.0.

Maybe I took it wrong. Looking forward to your reply!

stefanscherzinger commented 1 month ago

Hi @yuweiDu

Nice work and it helps me save a lot of time.

Thanks!

When working with a real robot, I recommend guiding the robot with the cartesian_force_controller by hand and check if its behavior is what you would expect. This is the easiest way to check whether your setup is correct. Publishing ft_sensor_wrench by hand it a little counterintuitive.

After I pub the taget_wrench, the EE moved in -x direction

That's not what I would expect, I would expect the robot to move in +x direction. Also check the effect of the hand_frame_control parameter.

Could you share your controller specification and your respective URDF configuration?

yuweiDu commented 3 weeks ago

Hi @stefanscherzinger

I think I took it wrong. I tested it with a real tf sensor and it works.

Thank you for you reply!