Skip to content

Mujoco Camera topics and PointCloud2 topics are now displayed correctly in RViz #196

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

Open
wants to merge 3 commits into
base: feature/mujoco_simulation
Choose a base branch
from

Conversation

hello-robot-shehab
Copy link
Contributor

@hello-robot-shehab hello-robot-shehab commented Apr 16, 2025

Changes:

  • This PR is incremental and really only adds support for PointClouds by adding (create_pointcloud_msg), which you can visualize in RViz:
    Screenshot from 2025-04-16 11-19-22
  • Uses the for camera, frame in camera_data.get_all(auto_rotate=True).items(): call to publish rotated camera frames, relative to their get_camera_frame() camera frame.

To test, please use the use_cameras:=true parameter: ros2 launch stretch_simulation stretch_mujoco_driver.launch.py use_mujoco_viewer:=false mode:=navigation robocasa_layout:='G-shaped' robocasa_style:=Modern_1 use_cameras:=true

This PR depends on hello-robot/stretch_mujoco#52 (as well as all the other PR's mentioned in #194 ).

@hello-robot-shehab hello-robot-shehab force-pushed the feature/mujoco_simulation-cameras branch from f65518a to 91541d6 Compare April 25, 2025 18:47
@@ -618,36 +610,6 @@ def command_mobile_base_velocity_and_publish_state(self):
i.linear_acceleration.z = az
self.imu_wrist_pub.publish(i)

if self.broadcast_odom_tf:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This just got moved up

@@ -538,36 +560,6 @@ def command_mobile_base_velocity_and_publish_state(self):
# publish IMU sensor data
sensor_status = self.sim.pull_sensor_data()

try:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this just got moved down/refactored to def publish_camera_and_lidar()

@hello-robot-shehab hello-robot-shehab force-pushed the feature/mujoco_simulation-cameras branch from 91c533c to 89c5b03 Compare May 27, 2025 17:20
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