Skip to content

[Bug Report] VisualizationMarkers uses wrong prototype when marker count equals number of prototypes #5262

Closed

Description

@j3soon

Describe the bug

VisualizationMarkers.visualize() can render the wrong prototype when all the following are true:

  • the marker config has multiple prototypes
  • marker_indices is omitted
  • the number of markers (num_envs) equals the number of prototypes
Expected Current Bug (with num_envs equals the number of marker prototypes)
Image Image
Image Image
Image Image

Take the first row (Franka) as an example, it is using FRAME_MARKER_CFG with 2 prototypes frame and connecting_line.

FRAME_MARKER_CFG = VisualizationMarkersCfg(
markers={
"frame": sim_utils.UsdFileCfg(
usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/UIElements/frame_prim.usd",
scale=(0.5, 0.5, 0.5),
),
"connecting_line": sim_utils.CylinderCfg(
radius=0.002,
height=1.0,
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(1.0, 1.0, 0.0), roughness=1.0),
),
}
)
"""Configuration for the frame marker."""

The visualize() call doesn't pass marker_indices

ee_marker.visualize(ee_pose_w[:, 0:3], ee_pose_w[:, 3:7])
goal_marker.visualize(ik_commands[:, 0:3] + scene.env_origins, ik_commands[:, 3:7])

which results in the default indices (for each prototype):

self._instancer_manager.GetProtoIndicesAttr().Set(list(range(self.num_prototypes)))

being preserved:

def visualize(
self,
translations: np.ndarray | torch.Tensor | None = None,
orientations: np.ndarray | torch.Tensor | None = None,
scales: np.ndarray | torch.Tensor | None = None,
marker_indices: list[int] | np.ndarray | torch.Tensor | None = None,
):
"""Update markers in the viewport.

The function will also update the marker prototypes based on their prototype indices. For instance,
if you have two marker prototypes, and you pass the following marker indices: [0, 1, 0, 1], the function
will update the first and third markers with the first prototype, and the second and fourth markers
with the second prototype. This is useful when you want to visualize different markers in the same
scene. The list of marker indices must have the same number of elements as the translations, orientations,
or scales. If the number of elements is different, the function will raise an error.

marker_indices: Decides which marker prototype to visualize. Shape is (M).
Defaults to None, which means left unchanged provided that the total number of markers
is the same as the previous call. If the number of markers is different, the function
will update the number of markers in the scene.

Steps to reproduce

./isaaclab.sh -p scripts/tutorials/05_controllers/run_diff_ik.py --num_envs=2
./isaaclab.sh -p scripts/tutorials/05_controllers/run_osc.py --num_envs=2
# or
./isaaclab.sh -p scripts/reinforcement_learning/rl_games/play.py --task Isaac-Reach-Franka-v0 --num_envs 2 --use_pretrained_checkpoint
./isaaclab.sh -p scripts/reinforcement_learning/rl_games/play.py --task Isaac-Reach-UR10-v0 --num_envs 2 --use_pretrained_checkpoint
# or
./isaaclab.sh -p scripts/environments/zero_agent.py --task Isaac-Dexsuite-Kuka-Allegro-Reorient-Play-v0 --num_envs 3

System Info

Describe the characteristic of your environment:

  • Commit: f4aa17f (latest commit on main)
  • Isaac Sim Version: 5.1.0-rc.19+release.26219.9c81211b.gl
  • OS: Ubuntu 24.04
  • GPU: RTX PRO 6000 Blackwell Max-Q Workstation Edition
  • CUDA: 12.8
  • GPU Driver: 580.126.09

Additional context

This can be fixed by either

  • fixing the example calls to include a zero tensor marker_indices in visualize call. (minimal fix)
  • or patch the visualization marker behavior when marker_indices is None. (may be the best in long run, but will need discussion on the best way to proceed)

I can work on a PR for this if preferred.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Acceptance Criteria

  • The commands above should have correct markers
  • (Optional) Add test to prevent regressions

Activity

  1. RandomOakForest commented on Apr 23, 2026

    @RandomOakForest
    Collaborator

    Thank you for posting this. The team is actively working to resolve this.

  2. added
    bug
    on Apr 23, 2026
  3. moved this to Backlog in Isaac Labon May 1, 2026
  4. moved this from Backlog to Ready in Isaac Labon May 1, 2026
  5. matthewtrepte commented on Jun 4, 2026

    @matthewtrepte
    Collaborator

    thanks for catching this!

    this is fixed in a PR that will be merged in soon

  6. moved this from Ready to Done in Isaac Labon Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions