Feature/manipulation scenario#3
Conversation
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
| # Install Python executables | ||
| install(PROGRAMS | ||
| DESTINATION lib/${PROJECT_NAME} | ||
| ) |
|
|
||
| # ros2_control using FakeSystem as hardware | ||
| ros2_controllers_path = os.path.join( | ||
| get_package_share_directory("moveit_resources_panda_moveit_config"), |
There was a problem hiding this comment.
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.
| get_package_share_directory("moveit_resources_panda_moveit_config"), | |
| get_package_share_directory("panda_moveit_config"), |
| <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> |
There was a problem hiding this comment.
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.
| <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> |
| 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 |
There was a problem hiding this comment.
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.
| <description>TODO: Package description</description> | ||
| <maintainer email="alex.kalm.dev@gmail.com">alexthunderrex</maintainer> | ||
| <license>TODO: License declaration</license> |
There was a problem hiding this comment.
The package description and license are marked as TODO. Please fill these out with appropriate information to make the package metadata complete.
| <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> |
| description='TODO: Package description', | ||
| license='TODO: License declaration', |
There was a problem hiding this comment.
|
|
||
| <maintainer email="dave@dav.ee">Dave Coleman</maintainer> | ||
|
|
||
| <license>BSD</license> |
There was a problem hiding this comment.
| <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> |
There was a problem hiding this comment.
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>
| <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> |
There was a problem hiding this comment.
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.
Manipulation demo added
Whats included:
Franka robot model setup with Moveit packages and pick_and_place script to grasp cube in the scene