Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KincoActuatorIsaacLab
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kevin
KincoActuatorIsaacLab
Commits
61c4fd9d
Commit
61c4fd9d
authored
Mar 09, 2024
by
Mayank Mittal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes import of terrain-based 2d-pose command term
parent
c7f42931
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
__init__.py
...saac.orbit/omni/isaac/orbit/envs/mdp/commands/__init__.py
+2
-2
commands_cfg.py
....orbit/omni/isaac/orbit/envs/mdp/commands/commands_cfg.py
+4
-5
pose_2d_command.py
...bit/omni/isaac/orbit/envs/mdp/commands/pose_2d_command.py
+7
-5
No files found.
source/extensions/omni.isaac.orbit/omni/isaac/orbit/envs/mdp/commands/__init__.py
View file @
61c4fd9d
...
...
@@ -8,12 +8,12 @@
from
.commands_cfg
import
(
NormalVelocityCommandCfg
,
NullCommandCfg
,
TerrainBasedPose2dCommandCfg
,
UniformPose2dCommandCfg
,
UniformPoseCommandCfg
,
UniformTerrainBasedPose2dCommandCfg
,
UniformVelocityCommandCfg
,
)
from
.null_command
import
NullCommand
from
.pose_2d_command
import
UniformPose2dCommand
,
UniformTerrainBasedPose2dCommandCfg
from
.pose_2d_command
import
TerrainBasedPose2dCommand
,
UniformPose2dCommand
from
.pose_command
import
UniformPoseCommand
from
.velocity_command
import
NormalVelocityCommand
,
UniformVelocityCommand
source/extensions/omni.isaac.orbit/omni/isaac/orbit/envs/mdp/commands/commands_cfg.py
View file @
61c4fd9d
...
...
@@ -12,7 +12,7 @@ from omni.isaac.orbit.managers import CommandTermCfg
from
omni.isaac.orbit.utils
import
configclass
from
.null_command
import
NullCommand
from
.pose_2d_command
import
UniformPose2dCommand
,
UniformTerrainBased
Pose2dCommand
from
.pose_2d_command
import
TerrainBasedPose2dCommand
,
Uniform
Pose2dCommand
from
.pose_command
import
UniformPoseCommand
from
.velocity_command
import
NormalVelocityCommand
,
UniformVelocityCommand
...
...
@@ -130,8 +130,7 @@ class UniformPose2dCommandCfg(CommandTermCfg):
asset_name
:
str
=
MISSING
"""Name of the asset in the environment for which the commands are generated."""
rel_standing_envs
:
float
=
MISSING
"""Probability threshold for environments where the robots that are standing still."""
simple_heading
:
bool
=
MISSING
"""Whether to use simple heading or not.
...
...
@@ -157,10 +156,10 @@ class UniformPose2dCommandCfg(CommandTermCfg):
@
configclass
class
Uniform
TerrainBasedPose2dCommandCfg
(
UniformPose2dCommandCfg
):
class
TerrainBasedPose2dCommandCfg
(
UniformPose2dCommandCfg
):
"""Configuration for the terrain-based position command generator."""
class_type
=
Uniform
TerrainBasedPose2dCommand
class_type
=
TerrainBasedPose2dCommand
@
configclass
class
Ranges
:
...
...
source/extensions/omni.isaac.orbit/omni/isaac/orbit/envs/mdp/commands/pose_2d_command.py
View file @
61c4fd9d
...
...
@@ -21,7 +21,7 @@ from omni.isaac.orbit.utils.math import quat_from_euler_xyz, quat_rotate_inverse
if
TYPE_CHECKING
:
from
omni.isaac.orbit.envs
import
BaseEnv
from
.commands_cfg
import
UniformPose2dCommandCfg
,
UniformTerrainBased
Pose2dCommandCfg
from
.commands_cfg
import
TerrainBasedPose2dCommandCfg
,
Uniform
Pose2dCommandCfg
class
UniformPose2dCommand
(
CommandTerm
):
...
...
@@ -64,8 +64,7 @@ class UniformPose2dCommand(CommandTerm):
def
__str__
(
self
)
->
str
:
msg
=
"PositionCommand:
\n
"
msg
+=
f
"
\t
Command dimension: {tuple(self.command.shape[1:])}
\n
"
msg
+=
f
"
\t
Resampling time range: {self.cfg.resampling_time_range}
\n
"
msg
+=
f
"
\t
Standing probability: {self.cfg.rel_standing_envs}"
msg
+=
f
"
\t
Resampling time range: {self.cfg.resampling_time_range}"
return
msg
"""
...
...
@@ -148,7 +147,7 @@ class UniformPose2dCommand(CommandTerm):
)
class
Uniform
TerrainBasedPose2dCommand
(
UniformPose2dCommand
):
class
TerrainBasedPose2dCommand
(
UniformPose2dCommand
):
"""Command generator that generates pose commands based on the terrain.
This command generator samples the position commands from the valid patches of the terrain.
...
...
@@ -157,7 +156,10 @@ class UniformTerrainBasedPose2dCommand(UniformPose2dCommand):
It expects the terrain to have a valid flat patches under the key 'target'.
"""
def
__init__
(
self
,
cfg
:
UniformTerrainBasedPose2dCommandCfg
,
env
:
BaseEnv
):
cfg
:
TerrainBasedPose2dCommandCfg
"""Configuration for the command generator."""
def
__init__
(
self
,
cfg
:
TerrainBasedPose2dCommandCfg
,
env
:
BaseEnv
):
# initialize the base class
super
()
.
__init__
(
cfg
,
env
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment