-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add multirotor/thruster actuator, multirotor asset and manager-based LMF2 drone task #3760
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
base: main
Are you sure you want to change the base?
Changes from 122 commits
01693ee
957bd52
20b7fe6
0fba4bf
9da4380
042d2fc
54d67af
9c38a67
a0fc071
7f7e67f
5ea906d
80a49d4
544bf3d
36f7583
3740128
10ea9b6
33c323c
dc31f3e
456b481
550a9ee
a5d6c59
6d7e6a9
8229e1e
dc95b61
bf36429
a07bf2e
f656a02
50622c9
f71fd00
72216ce
737aff6
473c295
ac2f724
e14defd
5d3fda7
7e037d4
8538b90
976b2bc
0e0c5ce
9c03606
b079a0e
658fae3
461affb
89a22b9
00ee21e
94489da
c24fd6d
6235db8
4ae38af
bd277a4
62c58a7
c5bc93b
a3b09a8
a19cce3
1b5ad99
c48f0eb
9e880ad
27487e7
4197836
9fd4819
bb113c9
f4e48fd
519f956
e27edff
b828403
a09c378
87cc1b6
fe5c95d
360f2be
aa90eed
44d4728
a11f1ff
0c3f77c
3ea7bc1
ab2783f
22568b9
bd3fd4e
f8ff26f
739309f
8e5724e
87c68cd
c8dfe1d
f583dda
9fdb66f
5de8148
2fcc00e
b055cb0
1760a21
f7723da
42265a7
5cd7a66
83dd1f4
3bb369a
d8d25eb
f0000d3
cebc6c6
c605b05
c82d66b
7177e2e
f2abb3b
2f4e363
e263236
a80a1a9
2429a66
71e0ec6
e8ddd2c
febac18
a0a6b2b
af1436c
9cb7c99
e5cfa4c
f417b07
968b64f
64177b3
3eacbd5
ac20dbb
b39285c
9be0504
191a4b9
11cca2b
d6a82ba
b17c7c2
cdb9380
f0dc677
d9348b1
b0f90d6
a717121
476798d
9d59216
b6d30f0
3292b8d
a46ff1f
658ce9c
ecaad98
a54454f
7b312d9
c3f5987
9286f62
22f8758
8587f17
865f407
8a01a1d
6b7e40b
2586248
895b888
df0384f
05fa7bc
280b979
256e4cb
71028fa
577671d
27545b4
b9ed6a4
51f002e
f28d9d3
91ac1ca
5b37927
fcb0ee9
ddfd5cc
167225f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,65 @@ | ||
| @ECHO OFF | ||
| pushd %~dp0 | ||
| REM Command file to build Sphinx documentation | ||
| set SOURCEDIR=. | ||
| set BUILDDIR=_build | ||
| REM Check if a specific target was passed | ||
| if "%1" == "multi-docs" ( | ||
| REM Check if SPHINXBUILD is set, if not default to sphinx-multiversion | ||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-multiversion | ||
| ) | ||
| where %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 1 ( | ||
| echo. | ||
| echo.The 'sphinx-multiversion' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-multiversion' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.http://sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
| %SPHINXBUILD% %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
| REM Copy the redirect index.html to the build directory | ||
| copy _redirect\index.html %BUILDDIR%\index.html | ||
| goto end | ||
| ) | ||
| if "%1" == "current-docs" ( | ||
| REM Check if SPHINXBUILD is set, if not default to sphinx-build | ||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| where %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 1 ( | ||
| echo. | ||
| echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.http://sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
| if exist "%BUILDDIR%\current" rmdir /s /q "%BUILDDIR%\current" | ||
| %SPHINXBUILD% -W "%SOURCEDIR%" "%BUILDDIR%\current" %SPHINXOPTS% | ||
| goto end | ||
| ) | ||
| REM If no valid target is passed, show usage instructions | ||
| echo. | ||
| echo.Usage: | ||
| echo. make.bat multi-docs - To build the multi-version documentation. | ||
| echo. make.bat current-docs - To build the current documentation. | ||
| echo. | ||
| :end | ||
| popd | ||
| @ECHO OFF | ||
|
|
||
| pushd %~dp0 | ||
|
|
||
| REM Command file to build Sphinx documentation | ||
|
|
||
| set SOURCEDIR=. | ||
| set BUILDDIR=_build | ||
|
|
||
| REM Check if a specific target was passed | ||
| if "%1" == "multi-docs" ( | ||
| REM Check if SPHINXBUILD is set, if not default to sphinx-multiversion | ||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-multiversion | ||
| ) | ||
| where %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 1 ( | ||
| echo. | ||
| echo.The 'sphinx-multiversion' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-multiversion' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.http://sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
| %SPHINXBUILD% %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
|
||
| REM Copy the redirect index.html to the build directory | ||
| copy _redirect\index.html %BUILDDIR%\index.html | ||
| goto end | ||
| ) | ||
|
|
||
| if "%1" == "current-docs" ( | ||
| REM Check if SPHINXBUILD is set, if not default to sphinx-build | ||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| where %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 1 ( | ||
| echo. | ||
| echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.http://sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
| if exist "%BUILDDIR%\current" rmdir /s /q "%BUILDDIR%\current" | ||
| %SPHINXBUILD% -W "%SOURCEDIR%" "%BUILDDIR%\current" %SPHINXOPTS% | ||
| goto end | ||
| ) | ||
|
|
||
| REM If no valid target is passed, show usage instructions | ||
| echo. | ||
| echo.Usage: | ||
| echo. make.bat multi-docs - To build the multi-version documentation. | ||
| echo. make.bat current-docs - To build the current documentation. | ||
| echo. | ||
|
|
||
| :end | ||
| popd |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |
|
|
||
| from . import actuator_net, actuator_pd | ||
| from .actuator_base import ActuatorBase | ||
| from .thruster import Thruster | ||
|
|
||
|
|
||
| @configclass | ||
|
|
@@ -283,3 +284,54 @@ class RemotizedPDActuatorCfg(DelayedPDActuatorCfg): | |
| This tensor describes the relationship between the joint angle (rad), the transmission ratio (in/out), | ||
| and the output torque (N*m). The table is used to interpolate the output torque based on the joint angle. | ||
| """ | ||
|
|
||
|
|
||
| @configclass | ||
| class ThrusterCfg: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: |
||
|
|
||
| class_type: type[Thruster] = Thruster | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: |
||
| """Concrete Python class that consumes this config.""" | ||
|
|
||
| # stiffness = 0.1 # only necessary to make this conform with Isaac | ||
| # damping = 0.1 # only necessary to make this conform with Isaac | ||
pascal-roth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| dt: float = 0.01 | ||
pascal-roth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| """Simulation/integration timestep used by the thruster update [s].""" | ||
|
|
||
| num_motors: int = 4 | ||
| """Number of motors/propulsors on the vehicle.""" | ||
pascal-roth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| thrust_range: tuple[float, float] = (0.1, 10.0) | ||
| """Per-motor thrust clamp range [N]: values are clipped to this interval.""" | ||
|
|
||
| max_thrust_rate: float = 100000.0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: default value 100000.0 N/s is extremely high for a thrust rate limit (allows 100kN/s change). For small drones like LMF2, typical values are 10-100 N/s. Is this intentional for a generic default? What is the expected motor/propeller size range for this actuator, and was 100kN/s validated against real hardware specs? |
||
| """Per-motor thrust slew-rate limit applied inside the first-order model [N/s].""" | ||
|
|
||
| thrust_const_range: tuple[float, float] = (9.26312e-06, 1.826312e-05) | ||
| """Range for thrust coefficient :math:`k_f` when ``use_rps=True`` [N/(rps²)].""" | ||
pascal-roth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| tau_inc_range: tuple[float, float] = (0.05, 0.08) | ||
| """Range of time constants when commanded output is **increasing** (rise dynamics) [s].""" | ||
|
|
||
| tau_dec_range: tuple[float, float] = (0.005, 0.005) | ||
| """Range of time constants when commanded output is **decreasing** (fall dynamics) [s].""" | ||
|
|
||
| torque_to_thrust_ratio: float = 0.07 | ||
| """Yaw-moment coefficient converting thrust to motor torque about +Z [N·m per N]. | ||
| Used as ``tau_z = torque_to_thrust_ratio * thrust_z * direction``. | ||
| """ | ||
|
|
||
| use_discrete_approximation: bool = True | ||
| """If ``True``, use discrete mixing factor ``1/(dt + tau)``; if ``False``, use continuous ``1/tau``.""" | ||
|
|
||
| use_rps: bool = True | ||
| """If ``True``, integrate in rotor-speed domain (ω) and compute thrust via ``F = k_f * ω**2``. | ||
| If ``False``, integrate thrust directly. | ||
| """ | ||
|
|
||
| integration_scheme: Literal["rk4", "euler"] = "rk4" | ||
| """Numerical integrator for the first-order model. Choose ``"euler"`` or ``"rk4"``.""" | ||
|
|
||
| thruster_names_expr: list[str] = ["back_left_prop", "back_right_prop", "front_left_prop", "front_right_prop"] | ||
|
|
||
pascal-roth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| """Articulation's joint names that are part of the group.""" | ||
|
||
Uh oh!
There was an error while loading. Please reload this page.