Skip to content

Commit

Permalink
Fix initial state references in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotochleb committed Nov 27, 2024
1 parent a15827d commit a3fd66d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/test_numpy_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,27 @@ def test_check_ros_eigen_control_conversion() -> None:
)

assert (
numpy_control.joint_state.name == back_converted_numpy_control.joint_state.name
numpy_control.initial_state.joint_state.name
== back_converted_numpy_control.initial_state.joint_state.name
), "Names after conversion back to Numpy is not equal initial values!"

np.testing.assert_array_equal(
numpy_control.joint_state.position,
back_converted_numpy_control.joint_state.position,
numpy_control.initial_state.joint_state.position,
back_converted_numpy_control.initial_state.joint_state.position,
err_msg="Joint state position after conversion back to "
+ "Numpy is not equal initial values!",
)

np.testing.assert_array_equal(
numpy_control.joint_state.velocity,
back_converted_numpy_control.joint_state.velocity,
numpy_control.initial_state.joint_state.velocity,
back_converted_numpy_control.initial_state.joint_state.velocity,
err_msg="Joint state velocity after conversion back to "
+ "Numpy is not equal initial values!",
)

np.testing.assert_array_equal(
numpy_control.joint_state.effort,
back_converted_numpy_control.joint_state.effort,
numpy_control.initial_state.joint_state.effort,
back_converted_numpy_control.initial_state.joint_state.effort,
err_msg="Joint state effort after conversion back to "
+ "Numpy is not equal initial values!",
)
Expand Down

0 comments on commit a3fd66d

Please sign in to comment.