Interbotix / interbotix_ros_manipulators

ROS Packages for Interbotix Arms
BSD 3-Clause "New" or "Revised" License
115 stars 81 forks source link

[Question]: How to use python interface to control gripper and joint at the same time #210

Open JiaheXu opened 1 month ago

JiaheXu commented 1 month ago

Question

Hi developers,

I am using aloha system for research. In python demo scripts, the user has to specify the joints' position or the end-effector matrix for the manipulator, and the gripper is a separated part. To make the trajectory (joints and the gripper) move at the same time (in other to make the motion smoother), is there any way to do it?

Robot Model

vp300s

Operating System

Ubuntu 22.04

ROS Version

ROS 2 Humble

Additional Info

No response

lukeschmitt-tr commented 1 month ago

By default, movement commands block execution of your program for some duration of time since the blocking parameter defaults to True. See an example of this here. By setting this to False and manually blocking execution by sleeping or by some other method, both commands can be executed in parallel. You can see this done in ALOHA here. You may also directly use the publishers that set joint and gripper commands as done here.