Skip to content

Add a camera-renderer setting to lab_sim - #970

Draft
danwahl wants to merge 1 commit into
mainfrom
nyx-renderer
Draft

danwahl wants to merge 1 commit into
mainfrom
nyx-renderer

Conversation

@danwahl

@danwahl danwahl commented Sep 17, 2026

Copy link
Copy Markdown

[written by AI]

needs: moveit_pro/#22738

Motivation

moveit_pro gains an optional path-traced camera renderer (PickNikRobotics/moveit_pro#22738). Nothing in that repository starts it, by design — a configuration has to ask for it. This wires lab_sim up to ask.

Brief description

One environment variable, MOVEIT_PRO_CAMERA_RENDERER, selects which renderer produces lab_sim's camera topics:

value cameras
mujoco MuJoCo only, on <camera>/color. The default, and the only option on an image carrying no Nyx runtime — every arm64 image and the amd64 CPU image.
nyx Nyx only, on <camera>/nyx_color. MuJoCo's camera and point-cloud rates go to 0.
both Both, on their own topics, at the cost of running two renderers.

The same variable drives both halves — picknik_ur.xacro resolves the MuJoCo ros2_control rates, runtime.launch.xml decides whether to include the Nyx node — so the description and the launch file cannot disagree about which renderer is running.

Two details worth a reviewer's attention:

  • point_cloud_publish_rate follows render_publish_rate rather than standing alone. The cloud timer publishes what the render timer produced (mujoco_system.cpp:1165), so zeroing only the render rate leaves a cloud timer running against a stopped renderer, reporting every camera as never having rendered, forever. Nyx has no depth output, so selecting nyx gives up point clouds — the same reason the new topic is additive rather than a replacement.
  • An unrecognized value fails the description instead of quietly leaving the configuration with no cameras at all. The xacro indexes a dict(...) by the value, which raises naming both the bad value and the expression. (A {...} literal cannot be used here: xacro's ${...} scanner stops at the first } and reports '{' was never closed.)

How it was tested

  • pre-commit run on both changed files — green. prettier reformats runtime.launch.xml; .xacro is not matched by that hook.
  • All three values plus an unrecognized one were run through xacro: mujoco, nyx, and both resolve to the intended rates, and bogus fails with error: 'bogus' naming the value.
  • The launch condition syntax ($(eval '"$(var x)" in ("a","b")')) and the nested $(env USER_WS $(env HOME)/user_ws) default were each proved under ROS 2 Jazzy.
  • find-pkg-share picknik_nyx_renderer is not yet verified end to end: the package exists in no published image until moveit_pro#22738 merges. That is what the needs: line above is for.

🤖 Generated with Claude Code

MOVEIT_PRO_CAMERA_RENDERER picks mujoco (the default), nyx, or both. The
robot description resolves the MuJoCo camera and point-cloud rates from it
and runtime.launch.xml reads the same variable to decide whether to start
picknik_nyx_renderer, so the two halves cannot disagree.

The point-cloud rate has to follow the render rate rather than stand alone:
the cloud timer publishes what the render timer produced, so running it
against a stopped renderer reports every camera as never having rendered.
Nyx has no depth output, so selecting it gives up point clouds.

An unrecognized value fails the description rather than leaving the config
with no cameras and no explanation.

Needs the Nyx renderer package, which is not in a released image yet, so
anything other than the default requires a moveit_pro build that carries it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YCk2yNsEQkVUSvhAmsJ4m
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

  • lab_sim
    • jazzy: no report produced — see run logs
  • hangar_sim
    • jazzy: no report produced — see run logs

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