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

feat: added support for spacecraft thrusters #2431

Merged
merged 35 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f3421a2
feat: added support for spacecraft thrusters
Pedro-Roque Jun 3, 2024
b22c8b2
rft: codechecked
Pedro-Roque Jun 4, 2024
24841e9
doc: adding basic tutorial with short description
Pedro-Roque Jun 4, 2024
9d88cdf
doc: improved comment regarding the method
Pedro-Roque Jun 4, 2024
3c802b5
fix: naming on comment
Pedro-Roque Jun 4, 2024
a8f08f1
fix: addressed request changes for PR
Pedro-Roque Jun 6, 2024
4e60a6f
doc: image reference change on tutorials/spacecraft_thrusters.md
Pedro-Roque Jun 5, 2024
05d5a6d
feat: added world with spacecraft example and dart model
Pedro-Roque Jun 7, 2024
52c1505
rft: moved mesh to fuel
Pedro-Roque Jun 7, 2024
dfa7fe1
fix: linting and dart version in SDF
Pedro-Roque Jun 10, 2024
95a397b
feat: added world with spacecraft example and dart model
Pedro-Roque Jun 10, 2024
4e5dd59
rft: moved mesh to fuel
Pedro-Roque Jun 7, 2024
8168609
fix: unmerged file
Pedro-Roque Jun 10, 2024
727b4ee
doc: fixed wrong doc instruction
Pedro-Roque Jun 10, 2024
cd7d2a4
feat: added world with spacecraft example and dart model
Pedro-Roque Jun 7, 2024
1a02dec
rft: moved mesh to fuel
Pedro-Roque Jun 7, 2024
13dd82a
fix: lint issue on plugin source file
Pedro-Roque Jun 10, 2024
bf7c966
fix: linting issues on tutorial file
Pedro-Roque Jun 10, 2024
d4c7530
fix: documentation and removed not used arguments
Pedro-Roque Jun 11, 2024
4689215
doc: removed trailing whitespaces
Pedro-Roque Jun 11, 2024
95f5231
doc: fixed line lengths
Pedro-Roque Jun 11, 2024
d48bcf1
doc: ... and removing trailing spaces again ...
Pedro-Roque Jun 11, 2024
6250a96
Some suggested changes (#1)
bperseghetti Jun 13, 2024
0c458e1
rft: fix building and cleaning unnecessary headers
Pedro-Roque Jun 13, 2024
11f4e42
feat: added 2D spacecraft simulation
Pedro-Roque Jun 13, 2024
9bed3ec
doc: updated documentation for 2D spacecraft simulator
Pedro-Roque Jun 13, 2024
6ef6b60
fix: trailing whitespace
Pedro-Roque Jun 13, 2024
d7e247f
add: unit test for spacecraft thrusters
Pedro-Roque Jul 17, 2024
dc2abc9
fix: bug on target 0.0 duty cycle
Pedro-Roque Jul 17, 2024
0a36b22
fix: linting
Pedro-Roque Jul 17, 2024
d2db67c
lint: shrank one line
Pedro-Roque Jul 17, 2024
e3ad96f
test: enabling for windows
Pedro-Roque Jul 18, 2024
c9678b5
revert: keep ignoring windows testing
Pedro-Roque Jul 18, 2024
3b5217c
fix: changed motor_speed to duty_cycle for clarity
Pedro-Roque Jul 18, 2024
9127aef
Merge remote-tracking branch 'origin/gz-sim7' into pr-spacecraft-thru…
Pedro-Roque Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions examples/worlds/ground_spacecraft_testbed.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" ?>
<!--
Spacecraft thruster plugin demo

Send commands to a single thruster:

gz topic -p 'normalized:[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]' -t /dart/command/duty_cycle --msgtype gz.msgs.Actuators
-->
<sdf version="1.6">
<world name="ground_testbed">
<gravity>0 0 -9.8066</gravity>
<physics name="1ms" type="ignored">
<max_step_size>0.001</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
<plugin
filename="gz-sim-physics-system"
name="gz::sim::systems::Physics">
</plugin>
<plugin
filename="gz-sim-scene-broadcaster-system"
name="gz::sim::systems::SceneBroadcaster">
</plugin>
<plugin
filename="gz-sim-user-commands-system"
name="gz::sim::systems::UserCommands">
</plugin>
<plugin
filename="gz-sim-sensors-system"
name="gz::sim::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<model name="ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
</collision>
<visual name="visual">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<ambient>0.8 0.8 0.8 1</ambient>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
</material>
</visual>
</link>
</model>
<include>
<pose>0 0 0 0 0 0</pose>
<uri>https://fuel.gazebosim.org/1.0/proque/models/kth_freeflyer</uri>
</include>
</world>
</sdf>
51 changes: 51 additions & 0 deletions examples/worlds/spacecraft.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" ?>
<!--
Spacecraft thruster plugin demo

Send commands to a single thruster:

gz topic -p 'normalized:[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]' -t /dart/command/duty_cycle --msgtype gz.msgs.Actuators
-->
<sdf version="1.6">
<world name="zero_g">
<gravity>0 0 0</gravity>
<physics name="1ms" type="ignored">
<max_step_size>0.001</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
<plugin
filename="gz-sim-physics-system"
name="gz::sim::systems::Physics">
</plugin>
<plugin
filename="gz-sim-scene-broadcaster-system"
name="gz::sim::systems::SceneBroadcaster">
</plugin>
<plugin
filename="gz-sim-user-commands-system"
name="gz::sim::systems::UserCommands">
</plugin>
<plugin
filename="gz-sim-sensors-system"
name="gz::sim::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<include>
<pose>0 0 0 0 0 0</pose>
<uri>https://fuel.gazebosim.org/1.0/proque/models/dart/7</uri>
</include>
</world>
</sdf>
1 change: 1 addition & 0 deletions src/systems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ add_subdirectory(rf_comms)
add_subdirectory(scene_broadcaster)
add_subdirectory(sensors)
add_subdirectory(shader_param)
add_subdirectory(spacecraft_thruster_model)
add_subdirectory(thermal)
add_subdirectory(thruster)
add_subdirectory(touch_plugin)
Expand Down
6 changes: 6 additions & 0 deletions src/systems/spacecraft_thruster_model/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
gz_add_system(spacecraft-thruster-model
SOURCES
SpacecraftThrusterModel.cc
PUBLIC_LINK_LIBS
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
)
Loading
Loading