Skip to content

Add gripper integration#7

Open
khangtpham25 wants to merge 53 commits into
isri-aist:mainfrom
khangtpham25:main
Open

Add gripper integration#7
khangtpham25 wants to merge 53 commits into
isri-aist:mainfrom
khangtpham25:main

Conversation

@khangtpham25
Copy link
Copy Markdown
Contributor

This is my current attempt of adding gripper integration to mc_rtde.

The current version does does not have options for positions, velocity, and torque control, and there is a delay between simulated and real robots. This is because of two issues:

  1. The gripper can operate at max 200Hz, so the benefit of real time are limited.
  2. I cannot directly use the output of mc_rtc to move the gripper, since the range of the gripper are not accurate. ur_rtde website have the reported range of 0 to 255, but this range vary from each run. ur_rtde/issue#356

The current implementation only required user to add gripper into their yaml

RTDE:
  ControlMode: Position

  ur5e:
    ip: "192.168.1.6"
    driver: "ur_rtde"
    gripper: "robotiq_arg85"

Since the changes are not standardized with the current code base, I would need some feedback to refine it.. I will update the README afterward.

Comment thread src/URControl.h Outdated
Comment thread src/DriverBridgeURModernDriver.cpp Outdated
Comment thread src/URControl.cpp Outdated
{
if(!ur->gripperName().empty())
{
ur->autoCalibrate();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto calibration should not be performed by default for safety. Please consider adding button to GUI to perform auto calibration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that's what it is doing ? when starting MCControlRtde, the gripper would not get calibrated. Only trigger when pressing this button.

Comment thread src/URControl.h Outdated
Comment thread src/URControl.h Outdated
Comment thread src/URControl.h Outdated
const float steady_threshold = 0.001f;
int stable_count = 0;

// TODO; change stable_required so that this function can be put in controlThread() ?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix TODO before merging

Copy link
Copy Markdown
Contributor Author

@khangtpham25 khangtpham25 Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix the others.
Sorry this is confusing. This one is more of a question I noted to ask you rather than TODO.
Should I do that? There is almost no benefit since the gripper cannot operate real time.

@khangtpham25
Copy link
Copy Markdown
Contributor Author

The gripper automatically perform the sequence [OPEN > CLOSE > OPEN] the first time when it is turned on. This is coded in ur_rtde. But after that, the gripper will not automatically run between move.

@ThomasDuvinage
Copy link
Copy Markdown
Contributor

Thank for the information, can you add it to the read me ?

@khangtpham25
Copy link
Copy Markdown
Contributor Author

Thank for the information, can you add it to the read me ?

I will. I am still testing/fixing some bugs when using it with dual arms.

Comment thread src/grippers/GripperRobotiq.cpp Outdated
khangtpham25 and others added 22 commits March 18, 2026 20:17
…iguration

- Use active_name_ to track currently using robot, and name_ (const) is default
- Reset tools' threads, interfaces, and gui before setting up new robot
Do not need ip since all robots have unique name
Comment thread src/URControl.h
}
else
{
// TOFIX: the rest of the joint in q need to be initialized as well even if they are mimic
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how to do this. Currently, if the gripper is not fully open, when MCControlRtde is called, that position will be the zero position (meaning, we can only close the gripper more)

@ThomasDuvinage ThomasDuvinage self-requested a review April 6, 2026 02:38
@khangtpham25
Copy link
Copy Markdown
Contributor Author

For the record, the yaml file suppose to look like this

MainRobot: UR5e
Enabled: [UrXLearning]
Timestep: 0.001

LogPolicy : threaded

RTDE:
  ControlMode: Position # Can be: Position/Velocity/Torque

  ur5e:
    ip: "192.168.1.6"
    driver: "ur_rtde"
    ur5e_robotiq_arg85:
      robotiq_arg85:
        type: robotiq
        # ip: "localhost" # [Optional] Robot's ip is used by default
        # port: 63352 # [Optional]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants