fzi-forschungszentrum-informatik / cartesian_controllers

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

Cartesian force control for real ur5e, robot doesn't move #161

Closed student-0103 closed 8 months ago

student-0103 commented 8 months ago

Hii,

I am able to see my real robot in Rviz by implementing this package for my UR5e: https://github.com/stefanscherzinger/cartesian_controllers_universal_robots

I turned of the scaled_joint_trajectory_controller:


cartesian_compliance_controller[cartesian_compliance_controller/CartesianComplianceController] inactive  
cartesian_force_controller[cartesian_force_controller/CartesianForceController] active    
force_torque_sensor_broadcaster[force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster] active    
cartesian_motion_controller[cartesian_motion_controller/CartesianMotionController] inactive  
motion_control_handle[cartesian_controller_handles/MotionControlHandle] inactive  
scaled_joint_trajectory_controller[ur_controllers/ScaledJointTrajectoryController] inactive  
joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] active 

Now, when I want to do an easy example, like is written in the README.md of cartesian_force_controller, the robot doesn't move when I check the box or when I use the command: $ ros2 topic pub --once /target_frame geometry_msgs/msg/PoseStamped '{header: {stamp: now, frame_id: "base_link"}, pose: { position: {x: 0.5, y: 0.5, z: 0}, orientation: {x: 0, y: 0, z: 0, w: 1}}}'

Any idea how I solve this problem? (For other cartesian controllers like cartesian_motion_controller, I got the same isue.

stefanscherzinger commented 8 months ago

@Daan0103

Careful with commanding arbitrary poses. The cartesian_compliance_controller and cartesian_motion_controller will drive there directly when they are active. There are no safety checks for possible collisions. It's best to use the RViz handle and steer them slowly to get a feeling how they move. In your case, both controllers are inactive, so they won't move.

But your cartesian_force_controller is active. This controller receives geometry_msgs/WrenchStamped to move. Check the input topic with

ros2 topic list | grep target

and make sure you are sending to the right topic. If you happen to have a 3D space mouse, you can use these utilities to steer your robot interactively.

Before you command something to the force controller, however, I recommend guiding the robot a little at its end-effector and see if it behaves as you would expect. This lets you feel its responsiveness (if unhappy, change controller parameters online) and check whether the force-torque signals are mapped correctly.

student-0103 commented 8 months ago

Ah, I see. Thanks for the help and safety warnings!