From 9b7ae7e065ae265645949c5b89d7ddd7fcd8b8b4 Mon Sep 17 00:00:00 2001 From: Vaios Papaspyros Date: Fri, 18 Oct 2024 17:06:53 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Dominic Reber <71256590+domire8@users.noreply.github.com> --- CHANGELOG.md | 5 ++--- .../space/cartesian/test_cartesian_state.py | 2 +- .../state_representation/space/joint/test_joint_state.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 885345714..1cca0ca59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,9 +18,8 @@ Release Versions ## Upcoming changes (in development) -- feat(state-representation): add utilities for CartesianStateVariable (#195) -- feat(state-representation): add utilities for JointStateVariable (#197) -- test(state-representation): add utility tests for Cartesian/JointState (#201) +- feat(state-representation): add utilities for CartesianStateVariable (#195, #201) +- feat(state-representation): add utilities for JointStateVariable (#197, #201) ## 9.0.0 diff --git a/python/test/state_representation/space/cartesian/test_cartesian_state.py b/python/test/state_representation/space/cartesian/test_cartesian_state.py index df1f244da..9de89695e 100755 --- a/python/test/state_representation/space/cartesian/test_cartesian_state.py +++ b/python/test/state_representation/space/cartesian/test_cartesian_state.py @@ -1015,7 +1015,7 @@ def test_utilities(self): self.assertTrue((state.get_state_variable(CartesianStateVariable.POSITION) == [4.0, 5.0, 6.0]).all()) state.set_state_variable(np.array([7.0, 8.0, 9.0]), CartesianStateVariable.POSITION) - self.assertTrue((state.get_state_variable(CartesianStateVariable.POSITION) == [7.0, 8.0, 9.0]).all()) + self.assertTrue((state.get_position() == [7.0, 8.0, 9.0]).all()) if __name__ == '__main__': unittest.main() diff --git a/python/test/state_representation/space/joint/test_joint_state.py b/python/test/state_representation/space/joint/test_joint_state.py index f0181fd1f..6c5231496 100755 --- a/python/test/state_representation/space/joint/test_joint_state.py +++ b/python/test/state_representation/space/joint/test_joint_state.py @@ -486,7 +486,7 @@ def test_utilities(self): self.assertTrue((state.get_state_variable(JointStateVariable.POSITIONS) == [4.0, 5.0, 6.0]).all()) state.set_state_variable(np.array([7.0, 8.0, 9.0]), JointStateVariable.POSITIONS) - self.assertTrue((state.get_state_variable(JointStateVariable.POSITIONS) == [7.0, 8.0, 9.0]).all()) + self.assertTrue((state.get_positions() == [7.0, 8.0, 9.0]).all()) if __name__ == '__main__': unittest.main()