Skip to content

Conversation

@mazm0002
Copy link

@mazm0002 mazm0002 commented Sep 9, 2024

LunarSim

LunarSim

Resolves #50, depends on space-ros/docs#36 and space-ros/simulation#39

This PR adds a Gazebo Garden based lunar world demo to spaceROS. The features included in this PR are:

  • A world with a lunar terrain that is derived from a Digital Elevation Model (DEM) of the area around the Shackleton Crater (close to the South Pole) taken from the Lunar Orbiter Laser Altimeter (LOLA).
  • A dynamic model of the Sun that accurately depicts the low light conditions near the lunar south pole by using ephemeris data from NASA's Horizons application.
  • Improved lunar surface texture created by blending surface normals with high resolution sand texture.

Screenshot from 2024-08-29 16-57-30

This package serves as a foundation for creating a realistic lunar simulation that the community can further expand upon. To support this, we have provided comprehensive documentation that guides users through the process of preparing and adding their own DEMs, ephemeris data, and custom textures. These tutorials can be found in our space-ros/docs PR ( space-ros/docs#36)

Instructions on how to run the demo can be found in the README. This image builds on top of the spaceROS base image and follows the format used in other demos for consistency.

@mazm0002 mazm0002 changed the title NASA Challenge_[@elementrobotics]_[LunarSim] NASA Challenge_[@elementrobotics]_[LunarSim] (closes #50) Sep 9, 2024
@mazm0002 mazm0002 marked this pull request as ready for review September 10, 2024 15:45
@Bckempa Bckempa added the Summer Sprint NASA Space ROS Sim Summer Sprint Challenge 2024 label Sep 15, 2024
@ivanperez-keera ivanperez-keera self-requested a review April 3, 2025 13:01
Copy link
Contributor

@ivanperez-keera ivanperez-keera left a comment

Choose a reason for hiding this comment

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

@mazm0002

This PR puts a lot of data in the demos repo (156000 lines more according to Github, and several megabytes worth of data). I believe some of that would belong in the https://github.com/space-ros/simulation/ repo, since it's models and such.

Can you please take a look at that repo, see how other demos are structured, see what would make sense to store there from your submission, send a PR to that repo, and adjust this one accordingly?

Thanks!

@mkhansenbot mkhansenbot self-requested a review April 3, 2025 14:55
@ivanperez-keera
Copy link
Contributor

Hi @mazm0002 Just following up on this.

@mazm0002
Copy link
Author

Hi @ivanperez-keera, apologies for the delay. I've moved the world assets to the simulation repo and made a PR there space-ros/simulation#39. I'm pulling the assets into the demo docker by adding the fork of the simulation repo to the demo_manual_pkgs.repos file. This means that once the assets have been merged, the demo_manual_pkgs.repos file needs to be updated in this PR to point to the upstream simulation repo. Let me know if there's a better way to go about this.

@ivanperez-keera
Copy link
Contributor

Thanks, @mazm0002 . Is there a way to make the screenshot image smaller? It's more than 1MB right now. Since it's meant to be read in the README, I'm hoping it'd be possible to make it smaller in size and compressing it a bit (perhaps making it a JPG?) without visible loss of precision.

@mazm0002
Copy link
Author

@ivanperez-keera I've converted the image to a JPG and it's down to 426 kb now.

@mazm0002
Copy link
Author

@mkhansenbot @ivanperez-keera Any idea why this is failing in CI now with this error? No space left on device : '/home/runner/runners/2.323.0/_diag/blocks/31686724-11e7-446f-a5d8-b04fa8a96898_c28fca0e-2bd9-5b57-8190-cdfd8e08d3b3.3'. Only change I made since the previous commit was the conversion of an image from png to jpg.

@asimonov
Copy link
Contributor

@mkhansenbot @ivanperez-keera Any idea why this is failing in CI now with this error? No space left on device : '/home/runner/runners/2.323.0/_diag/blocks/31686724-11e7-446f-a5d8-b04fa8a96898_c28fca0e-2bd9-5b57-8190-cdfd8e08d3b3.3'. Only change I made since the previous commit was the conversion of an image from png to jpg.

looks like all CIs are failing due to space issues

@ivanperez-keera ivanperez-keera self-requested a review May 1, 2025 02:32
@EzraBrooks
Copy link
Member

Is this based on the LunarSim project out of PUT, or a different thing? I don't want any confusion between the (possibly many) different things called "LunarSim" in our demos

@mazm0002
Copy link
Author

mazm0002 commented May 16, 2025

Is this based on the LunarSim project out of PUT, or a different thing? I don't want any confusion between the (possibly many) different things called "LunarSim" in our demos

This demo isn't associated with the one from PUT, but I wouldn't mind changing the name to avoid any confusion with other demos. Open to any suggestions, maybe something like "lunar_rover" or "lunar_terrain"?

@EzraBrooks
Copy link
Member

either of those names sound good to me!

@ivanperez-keera
Copy link
Contributor

I like lunar_rover. Seems very descriptive.

@asimonov
Copy link
Contributor

I vote for lunar_terrain. I did not look deep, but looks like the 'rover' part is just spawing a COTS rover model inside the terrain for teleoperation.

the main value is the Gazebo lunar environment with the sun plugin IMHO

@ivanperez-keera
Copy link
Contributor

@mazm0002 Are you ok with that change?

I'd like to help get this PR across the finish line. Could you please give me write access to your fork?

I can confirm that these changes rebase cleanly on top of main.

There's a small amount of re-org that we'll want to do in the history.

There's also a small change we need to make in the Dockerfile (it's failing to build atm due to a GPG key). I fixed that on my end and I'm building this image. Still going.

@ivanperez-keera
Copy link
Contributor

This is the next error I hit:

697.7 --- stderr: vision_msgs_rviz_plugins
697.7 CMake Error at CMakeLists.txt:62 (add_library):
697.7   Target "vision_msgs_rviz_plugins" links to target "yaml-cpp::yaml-cpp" but
697.7   the target was not found.  Perhaps a find_package() call is missing for an
697.7   IMPORTED target, or an ALIAS target is missing?
697.7 
697.7 
697.7 CMake Generate step failed.  Build files cannot be regenerated correctly.
697.7 ---
697.7 Failed   <<< vision_msgs_rviz_plugins [4.72s, exited with code 1]
698.8 Aborted  <<< ros_ign [1.80s]
698.8 
698.8 Summary: 46 packages finished [11min 38s]
698.8   1 package failed: vision_msgs_rviz_plugins
698.8   1 package aborted: ros_ign
698.8   7 packages had stderr output: lunar_sun_gz_plugin ros_gz_bridge ros_ign_bridge ros_ign_gazebo ros_ign_image vision_msgs_rviz_plugins xacro
------
Dockerfile:157
--------------------
 156 |     # Build the demo
 157 | >>> RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash \
 158 | >>>   && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release'
 159 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash   && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release'" did not complete successfully: exit code: 1
[rootlesskit:child ] error: command [./build.sh] exited: exit status 1
[rootlesskit:parent] error: child exited: exit status 1

@mazm0002
Copy link
Author

mazm0002 commented Jul 11, 2025

Hi @ivanperez-keera, sorry for the delays with this, I've been preoccupied with other work. I've given you write access to the repo, thanks for assisting in getting this merged. I can try reproduce the issue you're running into this weekend and see if I can fix it. And yes definitely fine with the name change.

@ivanperez-keera
Copy link
Contributor

@mazm0002 let me know if you are able to reproduce the issue. I'm still finding that on my end.

Thanks!

@EzraBrooks EzraBrooks requested review from EzraBrooks and Copilot July 24, 2025 14:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces LunarSim, a comprehensive Gazebo Garden-based lunar simulation for SpaceROS that provides a realistic lunar environment around the Shackleton Crater using NASA's Digital Elevation Model (DEM) data and dynamic sun modeling based on ephemeris data.

Key changes include:

  • Implementation of a lunar world simulation with accurate terrain modeling from LOLA DEM data
  • Dynamic sun positioning system using NASA Horizons ephemeris data with a custom Gazebo plugin
  • Surface texture enhancement through normal map blending and processing tools

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Dockerfile Main container configuration building on SpaceROS base with Gazebo Garden
run.sh Docker container execution script with GUI passthrough
lunar_sun_gz_plugin/ Gazebo plugin for dynamic sun movement based on ephemeris data
lunarsim_gz_worlds/ World files, launch scripts, and DEM processing tools
lunarsim_gz_bringup/ Launch configurations for spawning Leo rover with teleoperation
build.sh Build script for creating the demo Docker image
Comments suppressed due to low confidence (1)

lunarsim_demo/lunar_sun_gz_plugin/CHANGELOG.rst:2

  • The changelog header refers to 'leo_gz_plugins' but this is actually the changelog for 'lunar_sun_gz_plugin'. The package name should be corrected.
Changelog for package leo_gz_plugins

@EzraBrooks
Copy link
Member

@ivanperez-keera it doesn't seem like Copilot picked up on what might be wrong in the CMake (at least in this first pass) but it did seem to generate some other helpful review comments.

@mkhansenbot
Copy link
Contributor

I'm running the build, however I don't expect it to pass until #105 is merged (hopefully soon). I'm pushing to get the builds passing again, once we do, I'll re-run this one and help get it merged

@ivanperez-keera
Copy link
Contributor

@mkhansenbot how are these related?

I have a commit in my work machine when I built everything completely. I run into issues with keys and probably did something similar to what you did in the ROS trick demo, if that's what you are talking about.

@mkhansenbot
Copy link
Contributor

@ivanperez-keera - they're not directly related, but the ros_trick build was failing for all the CI builds, which is what I meant in that comment. I have since disabled that build in #107, so that's no longer blocking. I'm re-running the CI today to check.

@mazm0002
Copy link
Author

Build failed since the GPG key fix for the other demos hadn't been included. I've rebased the branch, builds fine on my local now, could you rerun the build @mkhansenbot? 🤞

@mazm0002
Copy link
Author

Just an fyi, space-ros/simulation#39 should be merged in before this one, and then this PR needs to be updated to point to the main repo instead of our fork in lunar_terrain/demo_manual_pkgs.repos

@mkhansenbot
Copy link
Contributor

This is passing CI, I think it just needs final approval from @ivanperez-keera

@ivanperez-keera
Copy link
Contributor

We are able to run the example but we are seeing error in the terminal that seem related to missing files or resources?

$ ./run.sh 
spaceros-user@ragnarok:~/demos_ws$ source install/setup.bash 
spaceros-user@ragnarok:~/demos_ws$ ros2 launch lunar_terrain_gz_bringup lunar_terrain_world.launch.py
[INFO] [launch]: All log files can be found below /home/spaceros-user/.ros/log/2025-08-25-23-18-13-534460-ragnarok.ndc.nasa.gov-107
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ruby-1]: process started with pid [108]
[INFO] [robot_state_publisher-2]: process started with pid [110]
[INFO] [create-3]: process started with pid [112]
[INFO] [parameter_bridge-4]: process started with pid [114]
[INFO] [xterm-5]: process started with pid [116]
[INFO] [parameter_bridge-6]: process started with pid [118]
[create-3] [INFO] [1756163893.798551487] [ros_gz_sim_create]: Requesting list of world names.
[robot_state_publisher-2] [INFO] [1756163893.799648616] [robot_state_publisher]: got segment antenna_link
[robot_state_publisher-2] [INFO] [1756163893.799720632] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-2] [INFO] [1756163893.799729092] [robot_state_publisher]: got segment base_link
[robot_state_publisher-2] [INFO] [1756163893.799734669] [robot_state_publisher]: got segment camera_frame
[robot_state_publisher-2] [INFO] [1756163893.799741262] [robot_state_publisher]: got segment camera_optical_frame
[robot_state_publisher-2] [INFO] [1756163893.799748415] [robot_state_publisher]: got segment imu_frame
[robot_state_publisher-2] [INFO] [1756163893.799754640] [robot_state_publisher]: got segment rocker_L_link
[robot_state_publisher-2] [INFO] [1756163893.799761210] [robot_state_publisher]: got segment rocker_R_link
[robot_state_publisher-2] [INFO] [1756163893.799768323] [robot_state_publisher]: got segment wheel_FL_link
[robot_state_publisher-2] [INFO] [1756163893.799775253] [robot_state_publisher]: got segment wheel_FR_link
[robot_state_publisher-2] [INFO] [1756163893.799780168] [robot_state_publisher]: got segment wheel_RL_link
[robot_state_publisher-2] [INFO] [1756163893.799784775] [robot_state_publisher]: got segment wheel_RR_link
[parameter_bridge-6] [INFO] [1756163893.815120115] [clock_bridge]: Creating GZ->ROS Bridge: [/clock (ignition.msgs.Clock]) -> /clock (rosgraph_msgs/msg/Clock)] (Lazy 0)
[parameter_bridge-6] [WARN] [1756163893.815244660] [clock_bridge]: Failed to create a bridge for topic [/clock] with ROS2 type [rosgraph_msgs/msg/Clock] to topic [/clock] with Gazebo Transport type [ignition.msgs.Clock]]
[ruby-1] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-spaceros-user'
[ruby-1] [Msg] Received world [/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/dem_moon.sdf] from the GUI.
[ruby-1] [Msg] Gazebo Sim Server v7.9.0
[ruby-1] [Msg] Loading SDF world file[/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/dem_moon.sdf].
[ruby-1] Warning [Utils.cc:132] [/sdf/world[@name="dem_heightmap"]/light[@name="sunlight"]/view_gizmo:/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/dem_moon.sdf:L163]: XML Element[view_gizmo], child of element[light], not defined in SDF. Copying[view_gizmo] as children of [light].
[ruby-1] Warning [Utils.cc:132] [/sdf/world[@name="dem_heightmap"]/light[@name="sunlight"]/frame:/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/dem_moon.sdf:L164]: XML Element[frame], child of element[light], not defined in SDF. Copying[frame] as children of [light].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="moon"]/link[@name="link"]/collision[@name="collision"]/geometry/heightmap/material:/home/spaceros-user/demos_ws/src/simulation/models/lunar_terrain/models/moon_dem/model.sdf:L13]: XML Element[material], child of element[heightmap], not defined in SDF. Copying[material] as children of [heightmap].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="moon"]/link[@name="link"]/visual[@name="visual"]/geometry/heightmap/material:/home/spaceros-user/demos_ws/src/simulation/models/lunar_terrain/models/moon_dem/model.sdf:L36]: XML Element[material], child of element[heightmap], not defined in SDF. Copying[material] as children of [heightmap].
[create-3] [INFO] [1756163894.417296777] [ros_gz_sim_create]: Waiting messages on topic [robot_description].
[create-3] [INFO] [1756163894.419192690] [ros_gz_sim_create]: Requested creation of entity.
[create-3] [INFO] [1756163894.419213005] [ros_gz_sim_create]: OK creation of entity.
[INFO] [create-3]: process has finished cleanly [pid 112]
[parameter_bridge-4] [INFO] [1756163894.815537946] [parameter_bridge]: Creating ROS->GZ Bridge: [/cmd_vel (geometry_msgs/msg/Twist) -> /cmd_vel (ignition.msgs.Twist)] (Lazy 0)
[parameter_bridge-4] [INFO] [1756163894.816259985] [parameter_bridge]: Creating GZ->ROS Bridge: [/imu/data_raw (ignition.msgs.IMU) -> /imu/data_raw (sensor_msgs/msg/Imu)] (Lazy 0)
[parameter_bridge-4] [INFO] [1756163894.816663125] [parameter_bridge]: Creating GZ->ROS Bridge: [/joint_states (ignition.msgs.Model) -> /joint_states (sensor_msgs/msg/JointState)] (Lazy 0)
[parameter_bridge-4] [INFO] [1756163894.816884912] [parameter_bridge]: Creating GZ->ROS Bridge: [/odom (ignition.msgs.Odometry) -> /odom (nav_msgs/msg/Odometry)] (Lazy 0)
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityTree/EntityTree.qml:148:7: QML ToolButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Plugin.cc:184] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[ruby-1] [Msg] Gazebo Sim GUI    v7.9.0
[ruby-1] [Msg] Copied installed config [/usr/share/gz/gz-sim7/gui/gui.config] to default config [/home/spaceros-user/.gz/sim/7/gui.config].
[ruby-1] [GUI] [Msg] Added plugin [3D View] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [MinimalScene] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so]
[ruby-1] [GUI] [Msg] Added plugin [Entity Context Menu] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [EntityContextMenuPlugin] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libEntityContextMenuPlugin.so]
[ruby-1] [GUI] [Msg] Added plugin [Scene Manager] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [GzSceneManager] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libGzSceneManager.so]
[ruby-1] [GUI] [Msg] Camera view controller topic advertised on [/gui/camera/view_control]
[ruby-1] [GUI] [Msg] Camera reference visual topic advertised on [/gui/camera/view_control/reference_visual]
[ruby-1] [GUI] [Msg] Camera view control sensitivity advertised on [/gui/camera/view_control/sensitivity]
[ruby-1] [GUI] [Msg] Added plugin [Interactive view control] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [InteractiveViewControl] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libInteractiveViewControl.so]
[ruby-1] [GUI] [Msg] Added plugin [Camera tracking] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [CameraTracking] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libCameraTracking.so]
[ruby-1] [GUI] [Msg] Using world control service [/world/dem_heightmap/control]
[ruby-1] [GUI] [Msg] Listening to stats on [/world/dem_heightmap/stats]
[ruby-1] [GUI] [Msg] Added plugin [World control] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [WorldControl] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libWorldControl.so]
[ruby-1] [GUI] [Msg] Listening to stats on [/world/dem_heightmap/stats]
[ruby-1] [GUI] [Msg] Added plugin [World stats] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [WorldStats] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libWorldStats.so]
[ruby-1] [GUI] [Msg] Added plugin [Component inspector] to main window
[ruby-1] [GUI] [Msg] Loaded plugin [ComponentInspector] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libComponentInspector.so]
[ruby-1] [GUI] [Msg] Added plugin [Entity tree] to main window
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/WorldStats/WorldStats.qml:53:3: QML RowLayout: Binding loop detected for property "x"
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] [GUI] [Wrn] [Application.cc:852] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[ruby-1] libEGL warning: failed to open /dev/dri/renderD128: Permission denied
[ruby-1] 
[ruby-1] libEGL warning: failed to open /dev/dri/card0: Permission denied
[ruby-1] 
[ruby-1] [GUI] [Msg] Loaded plugin [EntityTree] from path [/usr/lib/x86_64-linux-[Msg] Serving entity system service on [/entity/system/add]
[ruby-1] [Msg] Create service on [/world/dem_heightmap/create]
[ruby-1] [Msg] Remove service on [/world/dem_heightmap/remove]
[ruby-1] [Msg] Pose service on [/world/dem_heightmap/set_pose]
[ruby-1] [Msg] Pose service on [/world/dem_heightmap/set_pose_vector]
[ruby-1] [Msg] Light configuration service on [/world/dem_heightmap/light_config]
[ruby-1] [Msg] Physics service on [/world/dem_heightmap/set_physics]
[ruby-1] [Msg] SphericalCoordinates service on [/world/dem_heightmap/set_spherical_coordinates]
[ruby-1] [Msg] Enable collision service on [/world/dem_heightmap/enable_collision]
[ruby-1] [Msg] Disable collision service on [/world/dem_heightmap/disable_collision]
[ruby-1] [Msg] Material service on [/world/dem_heightmap/visual_config]
[ruby-1] [Msg] Material service on [/world/dem_heightmap/wheel_slip]
[ruby-1] [Msg] Loaded level [default]
[ruby-1] [Msg] Serving world controls on [/world/dem_heightmap/control], [/world/dem_heightmap/control/state] and [/world/dem_heightmap/playback/control]
[ruby-1] [Msg] Serving GUI information on [/world/dem_heightmap/gui/info]
[ruby-1] [Msg] World [dem_heightmap] initialized with [1ms] physics profile.
[ruby-1] [Msg] Serving world SDF generation service on [/world/dem_heightmap/generate_world_sdf]
[ruby-1] [Msg] Serving world names on [/gazebo/worlds]
[ruby-1] [Msg] Resource path add service on [/gazebo/resource_paths/add].
[ruby-1] [Msg] Resource path get service on [/gazebo/resource_paths/get].
[ruby-1] [Msg] Resource path resolve service on [/gazebo/resource_paths/resolve].
[ruby-1] [Msg] Resource paths published on [/gazebo/resource_paths].
[ruby-1] [Msg] Server control service on [/server_control].
[ruby-1] [Msg] Found no publishers on /stats, adding root stats topic
[ruby-1] [Msg] Found no publishers on /clock, adding root clock topic
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="camera"]/ignition_frame_id:<urdf-string>:L0]: XML Element[ignition_frame_id], child of element[sensor], not defined in SDF. Copying[ignition_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="camera"]/gz_frame_id:<urdf-string>:L0]: XML Element[gz_frame_id], child of element[sensor], not defined in SDF. Copying[gz_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="leo_imu_sensor"]/ignition_frame_id:<urdf-string>:L0]: XML Element[ignition_frame_id], child of element[sensor], not defined in SDF. Copying[ignition_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="leo_imu_sensor"]/gz_frame_id:<urdf-string>:L0]: XML Element[gz_frame_id], child of element[sensor], not defined in SDF. Copying[gz_frame_id] as children of [sensor].
[ruby-1] [Wrn] [SystemLoader.cc:79] Trying to load deprecated plugin [ignition-gazebo-joint-state-publisher-system]. Using [gz-sim-joint-state-publisher-system] instead.
[ruby-1] [Wrn] [SystemLoader.cc:79] Trying to load deprecated plugin [libignition-gazebo-diff-drive-system.so]. Using [libgz-sim-diff-drive-system.so] instead.
[ruby-1] [Wrn] [WorldFeatures.cc:117] Currently max contacts feature is only supported by the ode collision detector in dartsim.
[ruby-1] [Wrn] [Physics.cc:1298] Link's parent entity [12] not found on model map.
[ruby-1] [Msg] Joint A does not have JointPosition component. Creating one...
[ruby-1] [Msg] Joint B does not have JointPosition component. Creating one...
[ruby-1] [Msg] Joint A does not have JointForceCmd component. Creating one...
[ruby-1] [Msg] Joint B does not have JointForceCmd component. Creating one...
[ruby-1] [Msg] DiffDrive subscribing to twist messages on [cmd_vel]
[ruby-1] [Msg] Using [bullet] collision detector
[ruby-1] [Msg] Using [DantzigBoxedLcpSolver] solver.
[ruby-1] Dbg DART Bullet heightfield AABB: min = {-9995.12, -9995.12, -894.5}, max = {9995.12, 9995.12, 894.5} (will be translated by z=-178.768)
[ruby-1] [Wrn] [Component.hh:144] Trying to serialize component with data type [St6vectorIdSaIdEE], which doesn't have ], which doesn't have Trying to serialize component with data type [St6vectorIdSaIdEE], which doesn't have `operator<<`. Component will not be serialized.[Wrn] [Model.hh:69] 
[ruby-1] `operator<<`. Component will not be serialized.
[ruby-1] [Wrn] [Model.hh:69] 
[ruby-1] Skipping serialization / deserialization for models with //pose/@relative_to attribute.
[ruby-1] [Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v135WorldE], which doesn't have `operator<<`. Component will not be serialized.
[ruby-1] [GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [N3sdf3v135WorldE], which doesn't have `operator>>`. Component will not be deserialized.
[ruby-1] [GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[ruby-1] gnu/gz-sim-7/plugins/gui/libEntityTree.so]
[ruby-1] [GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[ruby-1] [GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[ruby-1] [GUI] [Msg] Move to service on [/gui/move_to]
[ruby-1] [GUI] [Msg] Follow service on [/gui/follow]
[ruby-1] [GUI] [Msg] Move to pose service on [/gui/move_to/pose]
[ruby-1] [GUI] [Msg] Camera pose topic advertised on [/gui/camera/pose]
[ruby-1] [GUI] [Msg] Follow offset service on [/gui/follow/offset]
[ruby-1] [GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[ruby-1] [GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[ruby-1] [GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="camera"]/ignition_frame_id:<data-string>:L105]: XML Element[ignition_frame_id], child of element[sensor], not defined in SDF. Copying[ignition_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="camera"]/gz_frame_id:<data-string>:L106]: XML Element[gz_frame_id], child of element[sensor], not defined in SDF. Copying[gz_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="leo_imu_sensor"]/ignition_frame_id:<data-string>:L114]: XML Element[ignition_frame_id], child of element[sensor], not defined in SDF. Copying[ignition_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="leo_imu_sensor"]/gz_frame_id:<data-string>:L115]: XML Element[gz_frame_id], child of element[sensor], not defined in SDF. Copying[gz_frame_id] as children of [sensor].
[ruby-1] [GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [St6vectorIdSaIdEE], which doesn't have `operator>>`. Component will not be deserialized.
[ruby-1] libEGL warning: failed to open /dev/dri/renderD128: Permission denied
[ruby-1] 
[ruby-1] libEGL warning: failed to open /dev/dri/card0: Permission denied
[ruby-1] 
[ruby-1] [GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="camera"]/ignition_frame_id:<data-string>:L105]: XML Element[ignition_frame_id], child of element[sensor], not defined in SDF. Copying[ignition_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="camera"]/gz_frame_id:<data-string>:L106]: XML Element[gz_frame_id], child of element[sensor], not defined in SDF. Copying[gz_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="leo_imu_sensor"]/ignition_frame_id:<data-string>:L114]: XML Element[ignition_frame_id], child of element[sensor], not defined in SDF. Copying[ignition_frame_id] as children of [sensor].
[ruby-1] Warning [Utils.cc:132] [/sdf/model[@name="leo_sim"]/link[@name="base_footprint"]/sensor[@name="leo_imu_sensor"]/gz_frame_id:<data-string>:L115]: XML Element[gz_frame_id], child of element[sensor], not defined in SDF. Copying[gz_frame_id] as children of [sensor].
[ruby-1] [Err] [MeshManager.cc:150] Invalid mesh filename extension[/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/__default__]
[ruby-1] [Wrn] [SceneManager.cc:1034] Actor skin mesh [/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/__default__] not found.
[ruby-1] [Wrn] [Ogre2Heightmap.cc:125] Heightmap final sampling should be 2^n
[ruby-1]  which differs from ogre1's 2^n+1
[ruby-1] The last row and column will be cropped
[ruby-1] size = (width * sampling) - sampling + 1
[ruby-1] [2049] = ([2049] * [1]) - [1] + 1
[ruby-1] [GUI] [Err] [MeshManager.cc:150] Invalid mesh filename extension[/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/__default__]
[ruby-1] [GUI] [Wrn] [SceneManager.cc:1034] Actor skin mesh [/home/spaceros-user/demos_ws/install/simulation/share/simulation/models/lunar_terrain/world/__default__] not found.
[ruby-1] [GUI] [Wrn] [Ogre2Heightmap.cc:125] Heightmap final sampling should be 2^n
[ruby-1]  which differs from ogre1's 2^n+1
[ruby-1] The last row and column will be cropped
[ruby-1] size = (width * sampling) - sampling + 1
[ruby-1] [2049] = ([2049] * [1]) - [1] + 1
[ruby-1] [Wrn] [Ogre2Camera.cc:412] Ogre2Camera::SetVisibilityMask: Mask bits c0000000 are set but will be ignored as they conflict with the reserved bits used internally by the ogre2 backend.
[ruby-1] [Wrn] [RenderPassSystem.cc:54] RenderPass of typeid 'N2gz9rendering2v714DistortionPassE' is not registered
[ruby-1] [Wrn] [ImageBrownDistortionModel.cc:112] ImageBrownDistortionModel is not supported in ogre2
[parameter_bridge-4] [INFO] [1756163918.992820115] [parameter_bridge]: Passing message from ROS geometry_msgs/msg/Twist to Gazebo gz.msgs.Twist (showing msg only once per type)

This is the image we see as we move around. Does this look right to you?

Screenshot at 2025-08-25 16-28-30

@ivanperez-keera
Copy link
Contributor

For what is worth, I had to make these changes to make things work on my machine. These may not work on all machines:

$ git diff
diff --git a/lunar_terrain/run.sh b/lunar_terrain/run.sh
index ae941ae..a580b1a 100755
--- a/lunar_terrain/run.sh
+++ b/lunar_terrain/run.sh
@@ -12,5 +12,6 @@ IMG_NAME=openrobotics/space_robots_lunar_terrain
 CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")"
 
 # Start the container
-docker run --rm -it --name "$CONTAINER_NAME"  --network host \
+docker run -v /dev/dri:/dev/dri --rm -it --name "$CONTAINER_NAME"  --network host \
+    -v /tmp/.X11-unix:/tmp/.X11-unix \

Copy link
Contributor

@ivanperez-keera ivanperez-keera left a comment

Choose a reason for hiding this comment

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

The lunar_sun_gz_plugin contains a CHANGELOG that seems to refer to a different project. Can you explain?

@ivanperez-keera
Copy link
Contributor

ivanperez-keera commented Aug 26, 2025

We evaluated this and it seems good to merge except for the question about the changelog indicated above:

Does the changelog, which seems to refer to a different project, need to be kept. If so, does anything in it need to be changed.

Does anybody need to be credited (e.g., if your starting point was a different package that you used as template and modified).

@ivanperez-keera
Copy link
Contributor

Tagging @mazm0002 for awareness.

@ivanperez-keera ivanperez-keera force-pushed the feature/lunarsim branch 3 times, most recently from 3fff5d9 to bb1949c Compare August 26, 2025 14:33
@mazm0002
Copy link
Author

mazm0002 commented Aug 27, 2025

We evaluated this and it seems good to merge except for the question about the changelog indicated above:

Does the changelog, which seems to refer to a different project, need to be kept. If so, does anything in it need to be changed.

Does anybody need to be credited (e.g., if your starting point was a different package that you used as template and modified).

@ivanperez-keera IIRC we did use some code from the leo_simulator library as a template, but have kept their (Fictionlab) copyright license notice on all the files that were derived from theirs. The changelog doesn't need to be kept, I will remove it.

@asimonov
Copy link
Contributor

asimonov commented Nov 29, 2025

FYI: looks like simulation#39 was merged

@ivanperez-keera
Copy link
Contributor

Before merging this, we need to adjust the URL to the simulator repo. It was pointing to their branch.

That commit should be squashed with the current commit.

Add a new demo that includes a rover moving around the moon. The demo features
lunar terrain and lighting.

This demo depends on assets included in the simulation repository.

Co-authored-by: Munir Azme <[email protected]>
@mazm0002
Copy link
Author

Before merging this, we need to adjust the URL to the simulator repo. It was pointing to their branch.

That commit should be squashed with the current commit.

@ivanperez-keera I've just updated the URL and squashed the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Summer Sprint NASA Space ROS Sim Summer Sprint Challenge 2024

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

A lunar demo with realistic terrain and lighting

7 participants