Skip to content

Conversation

@vamsikalagaturu
Copy link

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR transitions the pick-and-place FSM implementation from a C++ mock client to a Python-based FSM with integrated slip detection and service-based reference capture. The changes introduce a new ROS2 service definition, refactor the FSM to use Python with DSL-generated code, add gripper slip detection capabilities, and update the build configuration to support Python executables and interface generation.

Key Changes:

  • Replaced C++ FSM mock implementation with Python FSM using DSL-generated state machine
  • Added slip detection node with service-based reference capture mechanism
  • Introduced CaptureReference.srv service definition for coordinating gripper state monitoring

Reviewed changes

Copilot reviewed 43 out of 62 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
srv/CaptureReference.srv New service definition for capturing gripper reference position
src/pick_place_fsm_mock.cpp Refactored C++ FSM to integrate with DSL-generated state machine
src/pick_place.py New Python FSM implementation with comprehensive state management and action client integration
src/mock_servers_only.cpp Removed mock server implementation
src/error_handling.py New gripper slip detection node with service-based reference capture
package.xml Updated dependencies to support Python execution and interface generation
CMakeLists.txt Reconfigured build to generate interfaces and install Python executables
how_to_run.md Added comprehensive setup and execution instructions
README.md Added project overview and FSM documentation
include/pick_place_py.fsm New FSM definition file for DSL code generation
include/fsm_pick_place.py Auto-generated Python FSM implementation from DSL
Comments suppressed due to low confidence (2)

src/pick_place.py:1

  • The methods arm_goal_response and arm_result on lines 362-388 are duplicates of the private methods _arm_goal_response and _arm_result defined earlier (lines 335-360). This code duplication should be removed to improve maintainability. Remove these duplicate methods and ensure all callers use the private underscore-prefixed versions.
    src/error_handling.py:1
  • The filename error_handling.py does not accurately reflect the module's purpose, which is gripper slip detection. The module should be renamed to gripper_slip_detector.py to match the class name GripperSlipDetector and improve code clarity.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

**OR**

```bash
ros2 topic pub --once /object_pose geometry_msgs/msg/PoseStamped "{header: {frame_id: 'eddie_right_arm_camera_link'}, pose: {position: {x: 0.0, y: 0.0, z: 0.4}, orientation: {}}}"
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The example command publishes a pose with an empty orientation quaternion, which is invalid. A valid quaternion should have w: 1.0 for no rotation. Update the command to include orientation: {w: 1.0} to provide a valid example.

Suggested change
ros2 topic pub --once /object_pose geometry_msgs/msg/PoseStamped "{header: {frame_id: 'eddie_right_arm_camera_link'}, pose: {position: {x: 0.0, y: 0.0, z: 0.4}, orientation: {}}}"
ros2 topic pub --once /object_pose geometry_msgs/msg/PoseStamped "{header: {frame_id: 'eddie_right_arm_camera_link'}, pose: {position: {x: 0.0, y: 0.0, z: 0.4}, orientation: {w: 1.0}}}"

Copilot uses AI. Check for mistakes.
Added section on object slip detection, detailing reference capture and motion check processes.
Added command for object slip detection in README.
@vamsikalagaturu
Copy link
Author

@jetcanine your object slip detection code should not be in this repo

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.

4 participants