Isaac Sim ROS Workspaces

repository·main·Indexed 43 days ago

https://github.com/isaac-sim/isaacsim-ros_workspaces

Pre-configured ROS and ROS2 workspaces (humble_ws and jazzy_ws) for NVIDIA Isaac Sim. Includes the isaac_ros2_control_demo package for tight physics-rate synchronization using the IsaacSimSystem hardware plugin, an H1FullbodyController for humanoid locomotion, and a CompressedImageDecoder node for H.264/HEVC image streams.

Tokens
9.8K
Snippets
27
Records
45
Agent score
52%

What's inside Isaac Sim ROS Workspaces

  1. Compare isaac_ros2_control_demo vs isaac_moveit

    main

    When choosing between the two MoveIt integration methods:

    Featureisaac_moveitisaac_ros2_control_demo
    Hardware InterfaceTopic-based fake hardwareReal IsaacSimSystem hardware plugin
    Controller ManagerSeparate ros2_control_nodeIn-process ControllerManager
    Sync/FidelityStandard ROS 2 topic latencyTighter physics-rate sync; matches real-robot bringup
  2. Compare isaac_ros2_control_demo with isaac_moveit

    main

    The isaac_ros2_control_demo package differs from the standard isaac_moveit package in its architecture:

    Featureisaac_moveitisaac_ros2_control_demo
    Hardware InterfaceTopic-based fake hardwareReal IsaacSimSystem hardware plugin
    Controller ManagerSeparate ros2_control_nodeIn-process ControllerManager
    SyncStandard ROS 2 syncTighter physics-rate sync
    RealismSimulation-focusedMatches real-robot bringup

    Use isaac_ros2_control_demo when you need a tighter integration between the simulation physics and the ROS 2 control loop that mimics a real hardware deployment.

  3. Add or update dependencies in Pixi-ROS

    main

    Use the following commands to manage dependencies within the Pixi environment.

    Update pixi.toml from package.xml

    If you modify your ROS package.xml files, re-run the initialization command to sync pixi.toml:

    pixi ros init --distro humble

    Add new packages

    • Conda package: pixi add <package-name>
    • PyPI package: pixi add --pypi <package-name>

    Handling Unavailable Packages

    If a package is marked # NOT FOUND in pixi.toml, it could not be resolved. You can:

    1. Use a custom channel: pixi ros init --distro humble --channel <channel-url>
    2. Add a channel manually: pixi project channel add <channel-url>
    3. Install via PyPI: pixi add --pypi <package-name>
    pixi ros init --distro humble
    pixi add <package-name>
    pixi add --pypi <package-name>
  4. Run Isaac Sim with ROS 2 Bridge

    main

    To test the ROS bridge, you need to run the Zenoh server and the simulator in separate terminals, then enable the ROS 2 clock publisher in Isaac Sim.

    1. Terminal 1: Start the Zenoh server:
      pixi run zenoh
    2. Terminal 2: Start the simulator:
      pixi run sim
    3. In Isaac Sim:
      • Navigate to Tools -> Robotics -> ROS 2 OmniGraphs -> Clock -> OK.
      • Press the Play button.
    4. Terminal 3: Verify the ROS 2 topics (e.g., /clock) are visible:
      pixi run ros2 topic list
    pixi run zenoh
    pixi run sim
    pixi run ros2 topic list
  5. Select and build the appropriate ROS/ROS2 workspace

    main

    This repository provides two distinct workspaces based on the ROS2 distribution: humble_ws for ROS2 Humble and jazzy_ws for ROS2 Jazzy. When cloning the repository, you will receive both. You must follow the specific setup instructions for your chosen distribution to build the correct workspace.

    For detailed usage and installation instructions with Isaac Sim, refer to the official Isaac Sim documentation.

  6. Run the UR10 + MoveIt 2 in-process Controller Manager demo

    main

    This demo requires two separate terminals to run the Isaac Sim component and the ROS 2 workspace component simultaneously.

    Terminal 1: Isaac Sim

    Run the standalone Isaac Sim script from the omni_isaac_sim_ros2_control repository. This provides the IsaacSimSystem hardware plugin.

    Terminal 2: ROS 2 Workspace

    Launch the ur10_in_process.launch.py file from the isaac_ros2_control_demo package.

    Behavior:

    • The launch file waits for the /robot_description topic to become available.
    • It validates the message and writes it to a temporary ROS 2 parameter file before starting MoveIt.
    • It reports status every 60 seconds.
    • Once the ControllerManager is available, it activates both controllers.
    • RViz will open, allowing you to drive the UR10 in Isaac Sim using the Plan & Execute button in the MotionPlanning panel.
    # Terminal 1 (Isaac Sim side)
    source _build/linux-x86_64/release/setup_ros_env.sh
    ./_build/linux-x86_64/release/python.sh \
        source/standalone_examples/api/isaacsim.ros2.control/ur10_ros2_control_demo.py
    
    # Terminal 2 (ROS 2 Workspace side)
    ros2 launch isaac_ros2_control_demo ur10_in_process.launch.py
  7. Run Isaac Sim and verify ROS 2 connectivity

    main

    To test the ROS bridge, run the Zenoh server and the simulator in separate terminals.

    1. Terminal 1: Start the Zenoh server:

      pixi run zenoh
    2. Terminal 2: Start the simulator:

      pixi run sim
    3. In Isaac Sim: Enable the ROS 2 clock publisher:

      • Navigate to Tools -> Robotics -> ROS 2 OmniGraphs -> Clock -> OK
      • Press the Play button in the simulator.
    4. Terminal 3: Verify the topics are visible via the ROS CLI:

      pixi run ros2 topic list

      Expected output includes /clock, /parameter_events, and /rosout.

    pixi run zenoh
    pixi run sim
    pixi run ros2 topic list
  8. Set up the Pixi-ROS Workspace

    main

    This workspace uses Pixi for dependency management. Follow these steps to initialize and build the environment.

    Important for Windows users: Due to the 260-character path limit, clone this workspace into a short path (e.g., C:\IsaacSim-ros_workspaces\jazzy_ws). If you encounter errors like The filename or extension is too long, move the repository to a shorter path.

    Setup Steps

    1. Fetch git submodules: Initialize submodules (like greenwave_monitor and moveit) to avoid missing-package errors:

      git submodule update --init --recursive
    2. Install dependencies: If pixi install fails due to an unsupported lock-file version, run pixi self-update first, then:

      pixi install
    3. Build the workspace:

      pixi run build
    4. Activate the environment: Enter a shell with the ROS environment activated:

      pixi shell

      Alternatively, prefix any command with pixi run <command>.

    git submodule update --init --recursive
    pixi self-update
    pixi install
    pixi run build
    pixi shell
  9. Build the isaac_ros2_control_demo package

    main

    To build the isaac_ros2_control_demo package within your ROS 2 Jazzy workspace, navigate to the workspace root and use colcon build targeting only this package. After the build completes, source the workspace to update your environment.

    cd ~/IsaacSim-ros_workspaces/jazzy_ws
    colcon build --packages-select isaac_ros2_control_demo
    source install/setup.bash
  10. Format code using format_code.sh

    main

    To maintain code style, use the ./format_code.sh script located in the repository root.

    • To apply formatting: Run the script directly. On its first execution, it will install pinned versions of Black, isort, and clang-format into a local .venv-format directory.
    • To verify formatting: Use the --check flag to ensure code adheres to the style guide without making any modifications.
    # Apply formatting
    ./format_code.sh
    
    # Verify formatting without modifying files
    ./format_code.sh --check
  11. Determine the output topic name

    main

    When output_topic is not explicitly provided, the node uses the following logic to derive the raw image topic name from the input_topic:

    • If the input_topic ends with /compressed:
      • It removes the suffix. If the resulting string is empty, it uses /image.
      • Example: /camera/compressed $\rightarrow$ /camera/image (or /image if the input was just /compressed).
    • For all other cases:
      • It appends /raw to the input topic name.
      • Example: /camera/image $\rightarrow$ /camera/image/raw.
  12. Configure the isaac_ros2_control_demo launch parameters

    main

    When running the ur10_in_process.launch.py launch file, you can use the following arguments to customize behavior:

    • robot_description_file: The absolute path to a URDF file. Use this for offline testing or file-based integration.
    • robot_description_log_interval: The interval in seconds for reporting the status of the /robot_description check (defaults to 60).
    # Example usage with custom parameters
    ros2 launch isaac_ros2_control_demo ur10_in_process.launch.py robot_description_file:=/absolute/path/to/robot.urdf robot_description_log_interval:=10