Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to control gen3_lite_2f gripper via ros_control #323

Open
yuweiDu opened this issue May 30, 2024 · 3 comments
Open

how to control gen3_lite_2f gripper via ros_control #323

yuweiDu opened this issue May 30, 2024 · 3 comments

Comments

@yuweiDu
Copy link

yuweiDu commented May 30, 2024

I use ros_control for gen3_lite control. The hardware interface is used as (https://github.com/empriselab/kortex_hardware). The arm joints work well but something goes wrong with the gripper. I always get the error as:

runtime error: timeout detected: BaseClient::SendGripperCommand
Error Receiving: recvfrom() failed with error code : 104
terminate called after throwing an instance of 'std::runtime_error'
 what():  timeout detected: BaseCyclicClient::RefreshFeedback
/kortex_hardware died from signal 6
/kortex_hardware left a core dump
 Determined pattern '/tmp/rosmon-node-myw5SJ/core'
 Could not find a matching core file :-(

It seems that the error is related to BaseClient::SendGripperCommand. My OS is Ubuntu 20.04 and ROS is Noetic.

Thanks in advance for any help.

@smoya23
Copy link
Contributor

smoya23 commented May 30, 2024

Hi @yuweiDu ,

Could you provide more information on what command you ran ?

Error Receiving: recvfrom() failed with error code : 104

From the error messages, it looks like a comm issue, but I would like to try and reproduce this on my side. Are you able to reach the arm through the WebApp ? If so, can you open/close the gripper from there ?

@yuweiDu
Copy link
Author

yuweiDu commented Jun 3, 2024

Hi @smoya23 ,
Yes, of course. There is something missing in the original issue I wrote. I used the hardware interface provide by @madan96 (https://github.com/empriselab/kortex_hardware) and change the "finger_joint" to "right_finger_bottom_joint" in https://github.com/empriselab/kortex_hardware/blob/4a73db42c2b23f9855051fa3c327afe67a7950be/src/Gen3Robot.cpp#L171

  hardware_interface::JointHandle grp_vel_handle(
      jnt_state_interface.getHandle("finger_joint"),
      &cmd_vel[num_full_dof - 1]);
  jnt_vel_interface.registerHandle(grp_vel_handle);

  hardware_interface::JointHandle grp_pos_handle(
      jnt_state_interface.getHandle("finger_joint"),
      &cmd_pos[num_full_dof - 1]);
  jnt_pos_interface.registerHandle(grp_pos_handle);

  hardware_interface::JointHandle grp_eff_handle(
      jnt_state_interface.getHandle("finger_joint"),
      &cmd_eff[num_full_dof - 1]);
  jnt_eff_interface.registerHandle(grp_eff_handle);

By the WebApp, I don' know where to control the gripper. But I can control the gripper by calling the service /my_gen3_lite/base/send_gripper_command. I think the connection is good here.

Thank you!

@smoya23
Copy link
Contributor

smoya23 commented Jun 3, 2024

@yuweiDu Are you able to run our driver and control the gripper, by launching this command?

roslaunch kortex_driver kortex_driver.launch arm:=gen3_lite dof:=6 ip_address:=<your-robot's-ip>

To control the gripper from the WebApp, you move the slider on the bottom of the page when you open either the angular or pose control menus

image

If you're able to control the gripper through the service, when exactly are you getting this error ? Is it happenning as soon as you're launching your launch file ?

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

No branches or pull requests

2 participants