Skip to content

Feature/manipulation scenario#3

Open
AlexanderRex wants to merge 5 commits into
mainfrom
feature/manipulation_scenario
Open

Feature/manipulation scenario#3
AlexanderRex wants to merge 5 commits into
mainfrom
feature/manipulation_scenario

Conversation

@AlexanderRex
Copy link
Copy Markdown
Collaborator

Manipulation demo added
Whats included:

Franka robot model setup with Moveit packages and pick_and_place script to grasp cube in the scene

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @AlexanderRex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes a new feature that enables a manipulation demonstration using a Franka robot model within a MoveIt2 framework, simulated in Isaac Sim. The changes provide a self-contained Docker environment for quick setup and execution, along with a Python script to perform a pick-and-place task. This significantly expands the system's robotic manipulation capabilities and provides a robust platform for further development and testing of robot arm control and path planning.

Highlights

  • New Manipulation Scenario: Introduced a comprehensive manipulation scenario featuring a Franka Emika Panda robot, integrated with MoveIt2 and Isaac Sim.
  • Dockerized Environment: A new Docker setup has been added to easily deploy and manage the manipulation environment, including all necessary ROS2 and MoveIt2 dependencies.
  • Pick-and-Place Demo: A Python script demonstrating a full pick-and-place sequence for grasping a cube has been implemented, showcasing the robot's capabilities within the simulated environment.
  • MoveIt2 Configuration: Extensive MoveIt2 configurations are included for the Panda robot, covering URDF/SRDF definitions, kinematics, joint limits, and various planning pipelines (OMPL, Pilz, CHOMP, BioIK, TRAC-IK).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a comprehensive manipulation demo for the Franka robot, including Docker setup, ROS2 packages for the robot description, MoveIt configuration, and a pick-and-place application. The overall structure is good, but there are several issues that need to be addressed. Most critically, a file referenced in setup.py is missing, which will cause the build to fail. There are also incorrect package dependencies and configuration paths that will lead to runtime errors. I've provided detailed comments on these issues, along with suggestions for improving the Docker setup and resolving inconsistencies in the configuration files.

entry_points={
'console_scripts': [
'pick_and_place = moveit_apps.pick_and_place:main',
'move_to_pose = moveit_apps.move_to_pose_node:main'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The entry_points dictionary references moveit_apps.move_to_pose_node:main, but the file move_to_pose_node.py is not included in this pull request. This will cause the build to fail. Please either add the missing file or remove this entry point if it's not intended to be part of this package.

Comment on lines +13 to +16
# Install Python executables
install(PROGRAMS
DESTINATION lib/${PROJECT_NAME}
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The install(PROGRAMS ...) directive is empty. This can cause build warnings and is unnecessary code. Since this package does not appear to have any Python executables to install, this entire block should be removed.


# ros2_control using FakeSystem as hardware
ros2_controllers_path = os.path.join(
get_package_share_directory("moveit_resources_panda_moveit_config"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

This launch file is loading ros2_controllers.yaml from moveit_resources_panda_moveit_config, which appears to be an external package. However, a ros2_controllers.yaml is provided within the panda_moveit_config package in this repository. This is likely to cause issues by using an unintended controller configuration. You should use the configuration file from the panda_moveit_config package included in this PR.

Suggested change
get_package_share_directory("moveit_resources_panda_moveit_config"),
get_package_share_directory("panda_moveit_config"),

Comment on lines +35 to +38
<build_depend>moveit_resources_panda_moveit_config</build_depend>
<build_depend>ros2_control</build_depend>
<build_depend>ros2_controllers</build_depend>
<build_depend>moveit_simple_controller_manager</build_depend>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The packages moveit_resources_panda_moveit_config and moveit_simple_controller_manager are used at runtime in the launch files but are declared as <build_depend>. They should be <exec_depend> or <depend> to ensure they are available in the runtime environment. Without this change, the launch files will fail when trying to find resources from these packages.

Suggested change
<build_depend>moveit_resources_panda_moveit_config</build_depend>
<build_depend>ros2_control</build_depend>
<build_depend>ros2_controllers</build_depend>
<build_depend>moveit_simple_controller_manager</build_depend>
<depend>moveit_resources_panda_moveit_config</depend>
<build_depend>ros2_control</build_depend>
<build_depend>ros2_controllers</build_depend>
<depend>moveit_simple_controller_manager</depend>

Comment on lines +19 to +27
COPY humble_ws/src /tmp/humble_ws_src
RUN for pkg in $PACKAGES; do \
if [ -d "/tmp/humble_ws_src/$pkg" ]; then \
cp -r "/tmp/humble_ws_src/$pkg" /root/humble_ws/src/; \
else \
echo "Warning: Package $pkg not found in humble_ws/src"; \
fi \
done && \
rm -rf /tmp/humble_ws_src
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The COPY humble_ws/src /tmp/humble_ws_src instruction copies the entire source directory. This can be inefficient for Docker's layer caching, as any change in humble_ws/src will invalidate this layer and trigger a rebuild of subsequent layers, even if the changed files are not part of the packages being used. For better build performance, consider copying only the necessary package directories explicitly.

Comment on lines +6 to +8
<description>TODO: Package description</description>
<maintainer email="alex.kalm.dev@gmail.com">alexthunderrex</maintainer>
<license>TODO: License declaration</license>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The package description and license are marked as TODO. Please fill these out with appropriate information to make the package metadata complete.

Suggested change
<description>TODO: Package description</description>
<maintainer email="alex.kalm.dev@gmail.com">alexthunderrex</maintainer>
<license>TODO: License declaration</license>
<description>Python nodes for MoveIt2 applications like pick and place.</description>
<maintainer email="alex.kalm.dev@gmail.com">alexthunderrex</maintainer>
<license>Apache-2.0</license>

Comment on lines +18 to +19
description='TODO: Package description',
license='TODO: License declaration',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The package description and license are marked as TODO. Please fill these out with appropriate information.

Suggested change
description='TODO: Package description',
license='TODO: License declaration',
description='Python nodes for MoveIt2 applications like pick and place.',
license='Apache-2.0',


<maintainer email="dave@dav.ee">Dave Coleman</maintainer>

<license>BSD</license>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The package.xml specifies the license as BSD, but the LICENSE file in the same directory is Apache 2.0, and the README.md also states the license is Apache 2.0. The license declaration should be consistent across all files.

Suggested change
<license>BSD</license>
<license>Apache-2.0</license>

Comment on lines +91 to +101
<joint name="panda_finger_joint2">
<param name="mimic">panda_finger_joint1</param>
<param name="multiplier">1</param>

<state_interface name="position">
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity">
<param name="initial_value">0.0</param>
</state_interface>
</joint>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

You have defined state_interface for the mimicked joint panda_finger_joint2. The standard practice for ros2_control is to not define command or state interfaces for mimicked joints in the URDF/XACRO. The controller manager should handle propagating the state. Defining it here can be confusing and might lead to issues with other hardware interfaces. It's better to only define the mimic parameters.

            <joint name="panda_finger_joint2">
                <param name="mimic">panda_finger_joint1</param>
                <param name="multiplier">1</param>
            </joint>

Comment on lines +101 to +108
<group_state group="hand" name="close1">
<joint name="panda_finger_joint1" value="0"/>
<joint name="panda_finger_joint2" value="0"/>
</group_state>
<group_state group="hand" name="close2">
<joint name="panda_finger_joint1" value="0.022"/>
<joint name="panda_finger_joint2" value="0.022"/>
</group_state>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This file seems to be generated from panda_arm_hand.srdf.xacro, but the group_state for the hand group is inconsistent. The xacro file defines a close state, but this generated file has close1 and close2. This suggests the file is either outdated or was manually edited, which breaks the generation chain. Please regenerate the SRDF from the xacro source to ensure consistency. The names close1 and close2 are also not very descriptive.

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.

1 participant