Unverified Commit dcc33a26 authored by Kyle Morgenstein's avatar Kyle Morgenstein Committed by GitHub

Fixes apply actions method in the `NonHolonomicAction` action term class (#317)

# Description

in `NonHolonomicAction.apply_actions()` the velocity command was
incorrectly named `self.joint_vel` instead of `self._joint_vel_command`
as initialized in `NonHolonomicAction.__init__()`. This causes an error
when trying to instantiate the action config. I have corrected
and tested that it works.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [X] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [X] I have run all the tests with `./orbit.sh --test` and they pass
- [X] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 39ce5ac4
[package] [package]
# Note: Semantic Versioning is used: https://semver.org/ # Note: Semantic Versioning is used: https://semver.org/
version = "0.15.3" version = "0.15.4"
# Description # Description
title = "ORBIT framework for Robot Learning" title = "ORBIT framework for Robot Learning"
......
Changelog Changelog
--------- ---------
0.15.4 (2024-03-22)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed the NonHolonomicActionCfg variable naming from joint_vel to _joint_vel_command to match the initialized variable in the init() function.
0.15.3 (2024-03-21) 0.15.3 (2024-03-21)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
...@@ -11,6 +20,7 @@ Added ...@@ -11,6 +20,7 @@ Added
Fixed Fixed
^^^^^ ^^^^^
* Moved class variables in :class:`omni.isaac.orbit.scene.InteractiveScene` to correctly be assigned as * Moved class variables in :class:`omni.isaac.orbit.scene.InteractiveScene` to correctly be assigned as
instance variables. instance variables.
* Removed custom ``__del__`` magic method from :class:`omni.isaac.orbit.scene.InteractiveScene`. * Removed custom ``__del__`` magic method from :class:`omni.isaac.orbit.scene.InteractiveScene`.
......
...@@ -134,8 +134,8 @@ class NonHolonomicAction(ActionTerm): ...@@ -134,8 +134,8 @@ class NonHolonomicAction(ActionTerm):
quat_w = self._asset.data.body_quat_w[:, self._body_idx] quat_w = self._asset.data.body_quat_w[:, self._body_idx]
yaw_w = euler_xyz_from_quat(quat_w)[2] yaw_w = euler_xyz_from_quat(quat_w)[2]
# compute joint velocities targets # compute joint velocities targets
self.joint_vel[:, 0] = torch.cos(yaw_w) * self.processed_actions[:, 0] # x self._joint_vel_command[:, 0] = torch.cos(yaw_w) * self.processed_actions[:, 0] # x
self.joint_vel[:, 1] = torch.sin(yaw_w) * self.processed_actions[:, 0] # y self._joint_vel_command[:, 1] = torch.sin(yaw_w) * self.processed_actions[:, 0] # y
self.joint_vel[:, 2] = self.processed_actions[:, 1] # yaw self._joint_vel_command[:, 2] = self.processed_actions[:, 1] # yaw
# set the joint velocity targets # set the joint velocity targets
self._asset.set_joint_velocity_target(self.joint_vel, joint_ids=self._joint_ids) self._asset.set_joint_velocity_target(self._joint_vel_command, joint_ids=self._joint_ids)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment