Skip to content

Commit

Permalink
Merge branch 'isaac-sim:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sheikh-nv authored Oct 14, 2024
2 parents 54154da + 517c4c1 commit 5992eff
Show file tree
Hide file tree
Showing 45 changed files with 527 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .aws/postmerge-ci-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ phases:
docker login -u \$oauthtoken -p $NGC_TOKEN nvcr.io
docker build -t $IMAGE_NAME:$COMBINED_TAG \
--build-arg ISAACSIM_BASE_IMAGE_ARG=$ISAACSIM_BASE_IMAGE \
--build-arg ISAACSIM_VERSION_ARG=4.2.0 \
--build-arg ISAACSIM_VERSION_ARG=$ISAACSIM_BASE_VERSION \
--build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim \
--build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab \
--build-arg DOCKER_USER_HOME_ARG=/root \
Expand Down
2 changes: 1 addition & 1 deletion .aws/premerge-ci-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ phases:
cd $SRC_DIR
DOCKER_BUILDKIT=1 docker build -t isaac-lab-dev \
--build-arg ISAACSIM_BASE_IMAGE_ARG=$ISAACSIM_BASE_IMAGE \
--build-arg ISAACSIM_VERSION_ARG=4.2.0 \
--build-arg ISAACSIM_VERSION_ARG=$ISAACSIM_BASE_VERSION \
--build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim \
--build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab \
--build-arg DOCKER_USER_HOME_ARG=/root \
Expand Down
5 changes: 5 additions & 0 deletions .vscode/tools/settings.template.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"files.exclude": {
"**/.mypy_cache": true,
"**/__pycache__": true,
"**/*.egg-info": true
},
"files.associations": {
"*.tpp": "cpp",
"*.kit": "toml",
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Guidelines for modifications:
* Rosario Scalise
* Shafeef Omar
* Vladimir Fokow
* Wei Yang
* Xavier Nal
* Yang Jin
* Zhengyu Zhang
Expand Down
18 changes: 11 additions & 7 deletions docker/cluster/cluster_interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ submit_job() {

case $CLUSTER_JOB_SCHEDULER in
"SLURM")
CMD=sbatch
job_script_file=submit_job_slurm.sh
;;
"PBS")
CMD=bash
job_script_file=submit_job_pbs.sh
;;
*)
Expand All @@ -75,7 +73,7 @@ submit_job() {
;;
esac

ssh $CLUSTER_LOGIN "cd $CLUSTER_ISAACLAB_DIR && $CMD $CLUSTER_ISAACLAB_DIR/docker/cluster/$job_script_file \"$CLUSTER_ISAACLAB_DIR\" \"isaac-lab-$profile\" ${@}"
ssh $CLUSTER_LOGIN "cd $CLUSTER_ISAACLAB_DIR && bash $CLUSTER_ISAACLAB_DIR/docker/cluster/$job_script_file \"$CLUSTER_ISAACLAB_DIR\" \"isaac-lab-$profile\" ${@}"
}

#==
Expand Down Expand Up @@ -162,11 +160,17 @@ case $command in
scp $SCRIPT_DIR/exports/isaac-lab-$profile.tar $CLUSTER_LOGIN:$CLUSTER_SIF_PATH/isaac-lab-$profile.tar
;;
job)
[ $# -ge 1 ] && profile=$1 && shift
if [ $# -ge 1 ]; then
passed_profile=$1
if [ -f ".env.$passed_profile" ]; then
profile=$passed_profile
shift
fi
fi
job_args="$@"
echo "Executing job command"
[ -n "$profile" ] && echo "Using profile: $profile"
[ -n "$job_args" ] && echo "Job arguments: $job_args"
echo "[INFO] Executing job command"
[ -n "$profile" ] && echo -e "\tUsing profile: $profile"
[ -n "$job_args" ] && echo -e "\tJob arguments: $job_args"
source $SCRIPT_DIR/.env.cluster
# Get current date and time
current_datetime=$(date +"%Y%m%d_%H%M%S")
Expand Down
20 changes: 20 additions & 0 deletions docs/source/refs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ In the above example, the log file is located at ``.../logs/Kit/Isaac-Sim/2023.1
You can open this file to check the internal logs from the simulator. Also when reporting issues, please include
this log file to help us debug the issue.

Changing logging channel levels for the simulator
-------------------------------------------------

By default, the simulator logs messages at the ``WARN`` level and above on the terminal. You can change the logging
channel levels to get more detailed logs. The logging channel levels can be set through Omniverse's logging system.

To obtain more detailed logs, you can run your application with the following flags:

* ``--info``: This flag logs messages at the ``INFO`` level and above.
* ``--verbose``: This flag logs messages at the ``VERBOSE`` level and above.

For instance, to run a standalone script with verbose logging, you can use the following command:

.. code-block:: bash
# Run the standalone script with info logging
./isaaclab.sh -p source/standalone/tutorials/00_sim/create_empty.py --headless --info
For more fine-grained control, you can modify the logging channels through the ``omni.log`` module.
For more information, please refer to its `documentation <https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/docs/omni.log/Logging.html>`__.

Using CPU Scaling Governor for performance
------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions source/apps/isaaclab.python.headless.kit
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ renderer.active = "rtx"

app.content.emptyStageOnStart = false

# Disable print outs on extension startup information
# this only disables the app print_and_log function
app.enableStdoutOutput = false

# Setting the port for the embedded http server
exts."omni.services.transport.server.http".port = 8211

Expand Down
7 changes: 7 additions & 0 deletions source/apps/isaaclab.python.kit
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ exts."omni.kit.menu.utils".logDeprecated = false
# app.content.emptyStageOnStart = false
app.file.ignoreUnsavedOnExit = true # prevents save dialog when exiting

# disable print outs on extension startup information
# this only disables the app print_and_log function
app.enableStdoutOutput = false

# deprecate support for old kit.ui.menu
app.menu.legacy_mode = false
# use omni.ui.Menu for the MenuBar
Expand All @@ -137,6 +141,9 @@ exts."omni.kit.window.viewport".blockingGetViewportDrawable = false

exts."omni.kit.test".includeTests = [ "*isaac*" ]

# set the default ros bridge to disable on startup
isaac.startup.ros_bridge_extension = ""

[settings.app.python]
# These disable the kit app from also printing out python output, which gets confusing
interceptSysStdOutput = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ def add_app_launcher_args(parser: argparse.ArgumentParser) -> None:
arg_group.add_argument(
"--verbose", # Note: This is read by SimulationApp through sys.argv
action="store_true",
help="Enable verbose terminal output from the SimulationApp.",
help="Enable verbose-level log output from the SimulationApp.",
)
arg_group.add_argument(
"--info", # Note: This is read by SimulationApp through sys.argv
action="store_true",
help="Enable info-level log output from the SimulationApp.",
)
arg_group.add_argument(
"--experience",
Expand Down Expand Up @@ -552,6 +557,8 @@ def _config_resolution(self, launcher_args: dict):
" The file does not exist."
)

# Resolve the absolute path of the experience file
self._sim_experience_file = os.path.abspath(self._sim_experience_file)
print(f"[INFO][AppLauncher]: Loading experience file: {self._sim_experience_file}")
# Remove all values from input keyword args which are not meant for SimulationApp
# Assign all the passed settings to a dictionary for the simulation app
Expand All @@ -572,8 +579,16 @@ def _create_app(self):
for key in found_modules:
hacked_modules[key] = sys.modules[key]
del sys.modules[key]

# disable sys stdout and stderr to avoid printing the warning messages
# this is mainly done to purge the print statements from the simulation app
if "--verbose" not in sys.argv and "--info" not in sys.argv:
sys.stdout = open(os.devnull, "w") # noqa: SIM115
# launch simulation app
self._app = SimulationApp(self._sim_app_config, experience=self._sim_experience_file)
# enable sys stdout and stderr
sys.stdout = sys.__stdout__

# add Isaac Lab modules back to sys.modules
for key, value in hacked_modules.items():
sys.modules[key] = value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from prettytable import PrettyTable
from typing import TYPE_CHECKING

import carb
import omni.isaac.core.utils.stage as stage_utils
import omni.log
import omni.physics.tensors.impl.api as physx
from omni.isaac.core.utils.types import ArticulationActions
from pxr import PhysxSchema, UsdPhysics
Expand Down Expand Up @@ -542,7 +542,7 @@ def write_joint_limits_to_sim(
# update default joint pos to stay within the new limits
if torch.any((self._data.default_joint_pos < limits[..., 0]) | (self._data.default_joint_pos > limits[..., 1])):
self._data.default_joint_pos = torch.clamp(self._data.default_joint_pos, limits[..., 0], limits[..., 1])
carb.log_warn(
omni.log.warn(
"Some default joint positions are outside of the range of the new joint limits. Default joint positions"
" will be clamped to be within the new joint limits."
)
Expand Down Expand Up @@ -925,13 +925,13 @@ def _initialize_impl(self):
raise RuntimeError(f"Failed to create articulation at: {self.cfg.prim_path}. Please check PhysX logs.")

# log information about the articulation
carb.log_info(f"Articulation initialized at: {self.cfg.prim_path} with root '{root_prim_path_expr}'.")
carb.log_info(f"Is fixed root: {self.is_fixed_base}")
carb.log_info(f"Number of bodies: {self.num_bodies}")
carb.log_info(f"Body names: {self.body_names}")
carb.log_info(f"Number of joints: {self.num_joints}")
carb.log_info(f"Joint names: {self.joint_names}")
carb.log_info(f"Number of fixed tendons: {self.num_fixed_tendons}")
omni.log.info(f"Articulation initialized at: {self.cfg.prim_path} with root '{root_prim_path_expr}'.")
omni.log.info(f"Is fixed root: {self.is_fixed_base}")
omni.log.info(f"Number of bodies: {self.num_bodies}")
omni.log.info(f"Body names: {self.body_names}")
omni.log.info(f"Number of joints: {self.num_joints}")
omni.log.info(f"Joint names: {self.joint_names}")
omni.log.info(f"Number of fixed tendons: {self.num_fixed_tendons}")

# container for data access
self._data = ArticulationData(self.root_physx_view, self.device)
Expand Down Expand Up @@ -1142,7 +1142,7 @@ def _process_actuators_cfg(self):
velocity_limit=usd_velocity_limit[:, joint_ids],
)
# log information on actuator groups
carb.log_info(
omni.log.info(
f"Actuator collection: {actuator_name} with model '{actuator_cfg.class_type.__name__}' and"
f" joint names: {joint_names} [{joint_ids}]."
)
Expand Down Expand Up @@ -1177,7 +1177,7 @@ def _process_actuators_cfg(self):
# perform some sanity checks to ensure actuators are prepared correctly
total_act_joints = sum(actuator.num_joints for actuator in self.actuators.values())
if total_act_joints != (self.num_joints - self.num_fixed_tendons):
carb.log_warn(
omni.log.warn(
"Not all actuators are configured! Total number of actuated joints not equal to number of"
f" joints available: {total_act_joints} != {self.num_joints - self.num_fixed_tendons}."
)
Expand Down Expand Up @@ -1336,7 +1336,7 @@ def _log_articulation_joint_info(self):
effort_limits[index],
])
# convert table to string
carb.log_info(f"Simulation parameters for joints in {self.cfg.prim_path}:\n" + table.get_string())
omni.log.info(f"Simulation parameters for joints in {self.cfg.prim_path}:\n" + table.get_string())

# read out all tendon parameters from simulation
if self.num_fixed_tendons > 0:
Expand Down Expand Up @@ -1372,4 +1372,4 @@ def _log_articulation_joint_info(self):
ft_offsets[index],
])
# convert table to string
carb.log_info(f"Simulation parameters for tendons in {self.cfg.prim_path}:\n" + tendon_table.get_string())
omni.log.info(f"Simulation parameters for tendons in {self.cfg.prim_path}:\n" + tendon_table.get_string())
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from collections.abc import Sequence
from typing import TYPE_CHECKING

import carb
import omni.log
import omni.physics.tensors.impl.api as physx
from pxr import PhysxSchema, UsdShade

Expand Down Expand Up @@ -305,7 +305,7 @@ def _initialize_impl(self):
material_prim = mat_prim
break
if material_prim is None:
carb.log_info(
omni.log.info(
f"Failed to find a deformable material binding for '{root_prim.GetPath().pathString}'."
" The material properties will be set to default values and are not modifiable at runtime."
" If you want to modify the material properties, please ensure that the material is bound"
Expand Down Expand Up @@ -341,14 +341,14 @@ def _initialize_impl(self):
self._material_physx_view = None

# log information about the deformable body
carb.log_info(f"Deformable body initialized at: {root_prim_path_expr}")
carb.log_info(f"Number of instances: {self.num_instances}")
carb.log_info(f"Number of bodies: {self.num_bodies}")
omni.log.info(f"Deformable body initialized at: {root_prim_path_expr}")
omni.log.info(f"Number of instances: {self.num_instances}")
omni.log.info(f"Number of bodies: {self.num_bodies}")
if self._material_physx_view is not None:
carb.log_info(f"Deformable material initialized at: {material_prim_path_expr}")
carb.log_info(f"Number of instances: {self._material_physx_view.count}")
omni.log.info(f"Deformable material initialized at: {material_prim_path_expr}")
omni.log.info(f"Number of instances: {self._material_physx_view.count}")
else:
carb.log_info("No deformable material found. Material properties will be set to default values.")
omni.log.info("No deformable material found. Material properties will be set to default values.")

# container for data access
self._data = DeformableObjectData(self.root_physx_view, self.device)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from collections.abc import Sequence
from typing import TYPE_CHECKING

import carb
import omni.log
import omni.physics.tensors.impl.api as physx
from pxr import UsdPhysics

Expand Down Expand Up @@ -299,10 +299,10 @@ def _initialize_impl(self):
raise RuntimeError(f"Failed to create rigid body at: {self.cfg.prim_path}. Please check PhysX logs.")

# log information about the rigid body
carb.log_info(f"Rigid body initialized at: {self.cfg.prim_path} with root '{root_prim_path_expr}'.")
carb.log_info(f"Number of instances: {self.num_instances}")
carb.log_info(f"Number of bodies: {self.num_bodies}")
carb.log_info(f"Body names: {self.body_names}")
omni.log.info(f"Rigid body initialized at: {self.cfg.prim_path} with root '{root_prim_path_expr}'.")
omni.log.info(f"Number of instances: {self.num_instances}")
omni.log.info(f"Number of bodies: {self.num_bodies}")
omni.log.info(f"Body names: {self.body_names}")

# container for data access
self._data = RigidObjectData(self.root_physx_view, self.device)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from collections.abc import Sequence
from typing import Any, ClassVar

import carb
import omni.isaac.core.utils.torch as torch_utils
import omni.kit.app
import omni.log
from omni.isaac.version import get_version

from omni.isaac.lab.managers import EventManager
Expand Down Expand Up @@ -83,7 +83,7 @@ def __init__(self, cfg: DirectMARLEnvCfg, render_mode: str | None = None, **kwar
if self.cfg.seed is not None:
self.cfg.seed = self.seed(self.cfg.seed)
else:
carb.log_warn("Seed not set for the environment. The environment creation may not be deterministic.")
omni.log.warn("Seed not set for the environment. The environment creation may not be deterministic.")

# create a simulation context to control the simulator
if SimulationContext.instance() is None:
Expand All @@ -105,7 +105,7 @@ def __init__(self, cfg: DirectMARLEnvCfg, render_mode: str | None = None, **kwar
f"({self.cfg.decimation}). Multiple multiple render calls will happen for each environment step."
"If this is not intended, set the render interval to be equal to the decimation."
)
carb.log_warn(msg)
omni.log.warn(msg)

# generate scene
with Timer("[INFO]: Time taken for scene creation", "scene_creation"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from collections.abc import Sequence
from typing import Any, ClassVar

import carb
import omni.isaac.core.utils.torch as torch_utils
import omni.kit.app
import omni.log
from omni.isaac.version import get_version

from omni.isaac.lab.managers import EventManager
Expand Down Expand Up @@ -88,7 +88,7 @@ def __init__(self, cfg: DirectRLEnvCfg, render_mode: str | None = None, **kwargs
if self.cfg.seed is not None:
self.cfg.seed = self.seed(self.cfg.seed)
else:
carb.log_warn("Seed not set for the environment. The environment creation may not be deterministic.")
omni.log.warn("Seed not set for the environment. The environment creation may not be deterministic.")

# create a simulation context to control the simulator
if SimulationContext.instance() is None:
Expand All @@ -110,7 +110,7 @@ def __init__(self, cfg: DirectRLEnvCfg, render_mode: str | None = None, **kwargs
f"({self.cfg.decimation}). Multiple multiple render calls will happen for each environment step."
"If this is not intended, set the render interval to be equal to the decimation."
)
carb.log_warn(msg)
omni.log.warn(msg)

# generate scene
with Timer("[INFO]: Time taken for scene creation", "scene_creation"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from collections.abc import Sequence
from typing import Any

import carb
import omni.isaac.core.utils.torch as torch_utils
import omni.log

from omni.isaac.lab.managers import ActionManager, EventManager, ObservationManager
from omni.isaac.lab.scene import InteractiveScene
Expand Down Expand Up @@ -78,7 +78,7 @@ def __init__(self, cfg: ManagerBasedEnvCfg):
if self.cfg.seed is not None:
self.cfg.seed = self.seed(self.cfg.seed)
else:
carb.log_warn("Seed not set for the environment. The environment creation may not be deterministic.")
omni.log.warn("Seed not set for the environment. The environment creation may not be deterministic.")

# create a simulation context to control the simulator
if SimulationContext.instance() is None:
Expand Down Expand Up @@ -106,7 +106,7 @@ def __init__(self, cfg: ManagerBasedEnvCfg):
f"({self.cfg.decimation}). Multiple multiple render calls will happen for each environment step. "
"If this is not intended, set the render interval to be equal to the decimation."
)
carb.log_warn(msg)
omni.log.warn(msg)

# counter for simulation steps
self._sim_step_counter = 0
Expand Down
Loading

0 comments on commit 5992eff

Please sign in to comment.