Skip to content
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

Support for running simulation with gz sim in hitl mode #729

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

Ilia-Loginov
Copy link

@Ilia-Loginov Ilia-Loginov commented Jul 25, 2024

Support for using gz sim in hitl mode includes:

  • using this mavlink plugin for connection with a device https://github.com/tiiuae/px4-gzsim-plugins
  • adding new sdf models
  • adding new target for build (make px4_sitl gz-sim)
  • a script for easy simulation execution (./Tools/simulation/gz/hitl_run.sh x500/model_hitl.sdf)

On branch feature_gzsim_support
Changes to be committed:
modified: .gitmodules
new file: Tools/simulation/gz/hitl_run.sh
new file: Tools/simulation/gz/models/ssrc_holybro_x500/model_hitl.sdf
new file: Tools/simulation/gz/models/x500/model_hitl.sdf
new file: Tools/simulation/gz/plugins/px4-gzsim-plugins
modified: src/modules/simulation/gz_bridge/gz_env.sh.in
modified: src/modules/simulation/simulator_mavlink/CMakeLists.txt
new file: src/modules/simulation/simulator_mavlink/sitl_targets_gz-sim.cmake

On branch feature_gzsim_support
Changes to be committed:
	modified:   .gitmodules
	new file:   Tools/simulation/gz/hitl_run.sh
	new file:   Tools/simulation/gz/models/ssrc_holybro_x500/model_hitl.sdf
	new file:   Tools/simulation/gz/models/x500/model_hitl.sdf
	new file:   Tools/simulation/gz/plugins/px4-gzsim-plugins
	modified:   src/modules/simulation/gz_bridge/gz_env.sh.in
	modified:   src/modules/simulation/simulator_mavlink/CMakeLists.txt
	new file:   src/modules/simulation/simulator_mavlink/sitl_targets_gz-sim.cmake
@Ilia-Loginov Ilia-Loginov requested a review from haitomatic July 25, 2024 13:17
@Ilia-Loginov Ilia-Loginov self-assigned this Jul 25, 2024
@haitomatic
Copy link

Note that this is the support for running HITL with FC only platforms like saluki v2. For full stack FC + MC HITL for example with saluki v3, https://github.com/tiiuae/gazebo-sim-sandbox/tree/harmonic_sandbox is used.

@haitomatic haitomatic requested a review from jnippula July 26, 2024 08:00
@haitomatic
Copy link

lgtm, i also requested review from @jnippula

Copy link

@jnippula jnippula left a comment

Choose a reason for hiding this comment

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

Look good

<imuSubTopic>/link/base_link/sensor/imu_sensor/imu</imuSubTopic>
<poseSubTopic>/pose/info</poseSubTopic>
<mavlink_addr>192.168.200.101</mavlink_addr>
<mavlink_udp_local_port>14542</mavlink_udp_local_port>
Copy link

@jnippula jnippula Jul 26, 2024

Choose a reason for hiding this comment

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

Are these mavlink instances (addr and ports) defined some script to start udp mavlink automatically? Or is it meant to be so that mavlink instance is configured manually via parameters or started from command line?

There are some SD-card scripts in px4-firmware/ssrc_config folder to configure HITL mavlink instance to start automatically.

Copy link
Author

Choose a reason for hiding this comment

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

@Ilia-Loginov Ilia-Loginov merged commit 03584f3 into main Jul 26, 2024
27 of 28 checks passed
@Ilia-Loginov Ilia-Loginov deleted the feature_gzsim_support branch July 26, 2024 14:50
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.

3 participants