Skip to main content

๐Ÿค– Pick Node

See the source code for implementation details.

The Pick Node controls the MyCobot arm and gripper to pick up objects once the robot reaches the target location.
It integrates directly with the Mission Manager Node and executes a predefined pick sequence.


๐Ÿ”— MyCobot Integrationโ€‹

The Pick Node communicates with the MyCobot arm over:

  • ROS2 topics/services (if using mycobot_ros2 driver)
  • TCP/Wi-Fi API (if using direct API control)

Typical integration flow:

  1. Receive trigger from Mission Manager (/pick_trigger or action call)
  2. Calculate pick position (from /target_pose or pre-defined offset)
  3. Move arm to pre-grasp position (safe above object)
  4. Lower arm to grasp position
  5. Close gripper to grab object
  6. Lift to transport pose
  7. Send completion flag back to Mission Manager

โœ‹ Gripper Control Mechanismsโ€‹

The gripper can be controlled in two ways:

1. Position Command:โ€‹

  • Send "open" or "close" angles directly
  • Example: gripper.publish(servo_angle)

2. Service Call:โ€‹

  • Use dedicated service: /gripper_control with commands open or close

Example (pseudo-ROS2 code):

def close_gripper():
self.gripper_pub.publish(Int16(100)) # Fully closed

def open_gripper():
self.gripper_pub.publish(Int16(0)) # Fully open

๐Ÿ›ก Error Handling Proceduresโ€‹

Error CaseAction Taken
Arm fails to reach poseRetry up to N times, log warning
Gripper fails to close/openRetry with adjusted force, log error
Timeout on pick sequenceAbort pick, return failure to Mission Manager
Object slips after pickTrigger re-grasp attempt if enabled
Safety First

Always implement a maximum number of retries to avoid damaging the arm or gripper.


๐Ÿงช Testing & Verificationโ€‹

Before live tests:

  1. Simulation: Test pick sequence in MoveIt2 or Gazebo without real hardware
  2. Dry Run: Run arm sequence in the air (no object) to verify poses
  3. Slow Speed: Run live test at reduced joint speeds for safety

Verification checklist:

  • โœ… Arm moves to correct pre-grasp pose
  • โœ… Arm descends vertically to grasp pose
  • โœ… Gripper closes fully and holds object
  • โœ… Arm lifts without collision

๐Ÿ›  Troubleshooting Common Issuesโ€‹

SymptomPossible CauseSolution
Arm stops mid-motionPower or connection issueCheck MyCobot power & network
Gripper does not respondWrong topic/service nameVerify correct ROS2 topic/service
Pick position is offWrong transform or pose offsetCalibrate TF frames, adjust offsets
Object slips during liftLow grip force or wrong gripper poseIncrease grip force or close fully
Node crashes when triggeredMissing parameter or bad messageValidate inputs before starting

๐Ÿ“š Learn Moreโ€‹


๐ŸŽฏ Next Stepsโ€‹