Skip to content

Fix entity type values in sim tools and docs (backport #927) - #948

Merged
ahcorde merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-927
Aug 21, 2026
Merged

Fix entity type values in sim tools and docs (backport #927)#948
ahcorde merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-927

Conversation

@mergify

@mergify mergify Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦟 Bug fix

Summary

Fix the entity type values used by the delete_entity and set_entity_pose tools and the ros_gz_sim_demos documentation so they match ros_gz_interfaces/msg/Entity.msg.

The previous CLI help text and README table were inconsistent with the entity type constants defined in ros_gz_interfaces/msg/Entity.msg. This could cause users to pass the wrong entity type value when using --type.

### Entity Type Reference
When using the `set_entity_pose` and `delete_entity` commands, you can specify the entity type using the `--type` flag. The following type values are available:
| Value | Entity Type |
|-------|-------------|
| 0 | NONE |
| 1 | LIGHT |
| 2 | LINK |
| 3 | VISUAL |
| 4 | COLLISION |
| 5 | SENSOR |
| 6 | MODEL (default) |

int entity_type = 6; // Default to MODEL type
app.add_option("--type", entity_type,
"Entity type: 0=NONE, 1=LIGHT, 2=LINK, 3=VISUAL, 4=COLLISION, "
"5=SENSOR, 6=MODEL(default)");

int entity_type = 6; // Default to MODEL type
app.add_option("--type", entity_type,
"Entity type: 0=NONE, 1=LIGHT, 2=LINK, 3=VISUAL, 4=COLLISION, "
"5=SENSOR, 6=MODEL(default)");

# Entity type: constant definition
uint8 NONE = 0
uint8 LIGHT = 1
uint8 MODEL = 2
uint8 LINK = 3
uint8 VISUAL = 4
uint8 COLLISION = 5
uint8 SENSOR = 6
uint8 JOINT = 7

Backport Policy

  • This is safe to backport to the following versions:
    • Jetty
    • Ionic
    • Harmonic
    • Fortress
  • This should not be backported
  • I am not sure
  • Other (fill in yourself)

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Assisted-by" to your commits. (See this policy for more info.)

This is an automatic backport of pull request #927 done by [Mergify](https://mergify.com).

Signed-off-by: C88-YQ <1409947012@qq.com>
(cherry picked from commit 2ee8a5c)
@mergify
mergify Bot requested a review from ahcorde as a code owner August 21, 2026 13:24
@mergify mergify Bot mentioned this pull request Aug 21, 2026
19 tasks
@ahcorde
ahcorde merged commit 5ce324b into jazzy Aug 21, 2026
7 checks passed
@ahcorde
ahcorde deleted the mergify/bp/jazzy/pr-927 branch August 21, 2026 13:42
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Core development Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants