Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aloha Workspace for Simulation #56

Merged
merged 51 commits into from
Sep 20, 2024
Merged

Aloha Workspace for Simulation #56

merged 51 commits into from
Sep 20, 2024

Conversation

j3soon
Copy link
Owner

@j3soon j3soon commented Sep 13, 2024

This PR adds support for the following features:

  1. Robotic arm (Aloha arm)
  2. MoveIt 2
  3. Isaac Sim

These features were not present in the original codebase and can serve as references for future workspaces that incorporate robotic arms, MoveIt 2, or Isaac Sim.

Closes: #48

Isaac Sim

There are 3 ways to install Isaac Sim:

  1. Install through Omniverse Launcher (i.e., binary install)
  2. Use the pre-built Isaac Sim docker image
  3. (Experimental) Pip installation

The first option is challenging to set up within a container. The second option involves using a closed-source Dockerfile, which requires a free NGC account to pull the image. This approach adds difficulties for future maintenance for several reasons:

  • It locks us into a specific Docker base image while using Isaac Sim, limiting control over important configurations like the Ubuntu version.
  • ROS 2 must be manually installed on top of this image, leading to larger image sizes and preventing the reuse of existing images, such as osrf/ros:humble-desktop-full.
  • Upgrades can become difficult, especially if closed-source changes in the base image cause package compatibility issues.
  • If a normal user is used, need to manually chown all isaac-related files
  • and more...

The third option, while still experimental, simplifies Isaac Sim installation through pip install, allowing for easier integration. Although not all tutorials are updated for this method, I have come up with straightforward workarounds and can make Isaac Sim integration similar to that of Gazebo.

In this PR, I choose to use the third option, and believe it can allows much easier future maintenance for this repo. Nevertheless, it is worth noting that the first two options remain valuable for scenarios where long-term maintenance isn't necessary, such as quick testing or prototyping.

Limitations

  • Currently, only simulation is supported (as documented in the README) because I don't have access to the physical hardware yet.
  • Currently, it only supports x86 machines (also documented in the README).
    • I plan to test on AGX Orin in the near future and perform corresponding changes.
  • Some hardcoded solutions are in use, such as ExecuteProcess used in the launch file for Isaac Sim.

In addition, after this PR is merged, we'll need to update template_ws and other workspaces in a subsequent PR to ensure full Isaac Sim support across all workspaces. The modifications in the aloha_ws also fixes several issues present in the current template_ws.

Would appreciate if @YuZhong-Chen or @Assume-Zhan have some time to review this and provide some feedback. If you're able to, please add yourself to the Reviewers section before beginning the review. Thank you!

Using the `create_workspace.sh` script, and remove `minimal_pkg`
These commands are also tested on a fresh machine with NVIDIA GPU on the
`ubuntu:22.04` base image.

When executing `vkcube`, the following error may occur if the Vulkan
config files are missing:

    vkEnumerateInstanceExtensionProperties failed to find the VK_KHR_surface extension.

    Do you have a compatible Vulkan installable client driver (ICD) installed?
    Please look at the Getting Started guide for additional information.

If the required capabilities or libraries are missing, a black window
may popup with the following unwanted message:

    Selected GPU 0: llvmpipe (LLVM 15.0.7, 256 bits), type: 4

It is worth noting that the behavior may differ if the host machine has
Vulkan SDK installed. For example, using `--device /dev/dri` on a host
machine with Vulkan installed may not require certain config files or
libraries. Therefore, it is important to always test on a fresh machine.
…graph support for joint state publishing in isaac sim
…eded

If perception becomes necessary in the future, revert this commit and check all commands related to `$INSTALL_PERCEPTION` in `xsarm_amd64_install.sh`
If matlab becomes necessary in the future, revert this commit.
This is the default option when using Isaac Sim URDF Importer. It has been accidentally set to True while changing the articulation root.

API usages can be found in:

    ~/.local/share/ov/pkg/isaac-sim-4.1.0/extsPhysics/omni.physx.tests/omni/physxtests/testBases/filterTestBase.py
Conditionally run `rosdep install` based on the cache presence in the current container, not the install directory, as the install directory persists across containers.
Packages copied from the following command:

    rosdep install --from-paths src --ignore-src -y -r --simulate
These paths can be found by the diff of standalone script logs and `isaacsim omni.isaac.sim` logs
The ros2 context node can be observed in the ROS 2
example `Isaac Examples > ROS2 > MoveIt`.

Reference: https://docs.omniverse.nvidia.com/isaacsim/latest/ros2_tutorials/tutorial_ros2_moveit.html

This omnigraph node seems to be optional. However,
many Isaac Sim examples include this context node.
I think it may allow more flexible omnigraphs in
scenarios where multiple ros context are required.

Ref: https://docs.ros.org/en/humble/p/rclcpp/generated/classrclcpp_1_1Context.html
@j3soon
Copy link
Owner Author

j3soon commented Sep 15, 2024

Tested on a clean machine with L40 GPUs. If host UID isn't 1000, the permission issue can be resolved by this simple workaround: #53 (comment)

@j3soon j3soon changed the title Aloha Workspace Aloha Workspace for Simulation Sep 15, 2024
@j3soon
Copy link
Owner Author

j3soon commented Sep 16, 2024

Note that this PR is tested with docker engine version 27. Lower docker versions such as version 25 will report error due to the subpath feature used.

Ref: https://docs.docker.com/engine/release-notes/26.0/

@j3soon
Copy link
Owner Author

j3soon commented Sep 16, 2024

Just tested on a Ubuntu 22.04 Desktop environment with ARM CPU. MoveIt 2 can work without any code changes.

Please note that Gazebo and Isaac Sim do not support ARM CPUs, so trying to run them on such hardware will fail as expected.

@j3soon
Copy link
Owner Author

j3soon commented Sep 20, 2024

When controlling the Isaac Sim robot arm with MoveIt 2, it often exhibits overshooting behavior compared to Gazebo. The cause of this issue is still unclear.

I suspect this issue may be related to the dampness and stiffness when importing the URDF. However, the dampness seems to be explicitly set to 0.1 in the vx300s URDF. The following are some potential references:

I think we can document this behavior in README and open an issue. This issue could be left to future investigation when we are integrating our UR5 arm.

@j3soon
Copy link
Owner Author

j3soon commented Sep 20, 2024

I'll go ahead and merge this first. If you notice any issues in the future, please add your review here, and we can address them with a follow-up PR. Thanks!

@j3soon j3soon merged commit a85069d into main Sep 20, 2024
1 check failed
@j3soon j3soon deleted the aloha-ws branch September 20, 2024 15:22
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.

Create simulation-only workspace for Aloha arm for Isaac Sim
1 participant