-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed docker. Fixed github actions for catkin_lint, pytest, autodoc. …
…Fixed bugs with unit tests for control. updated pytorch, torchvision, ultralytics. cleaned up requirments.txt.
- Loading branch information
Showing
51 changed files
with
547 additions
and
1,227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
version: "3.3" | ||
|
||
# Instructions | ||
# https://github.com/utra-robosoccer/soccerbot/wiki/Docker | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,62 @@ | ||
import unittest | ||
|
||
import numpy as np | ||
from matplotlib import pyplot as plt | ||
from soccer_pycontrol.model.inverse_kinematics.ik_actions import IKActions | ||
from soccer_pycontrol.model.inverse_kinematics.kinematic_data import KinematicData | ||
|
||
PLOT = True | ||
|
||
|
||
class TestIK(unittest.TestCase): | ||
# TODO switch to placo for IK | ||
def test_x_sweep(self): | ||
""" | ||
Case 1: Standard case | ||
:return: None | ||
""" | ||
kinematic_data = KinematicData(robot_model="sigmaban") | ||
ik_actions = IKActions(kinematic_data) | ||
thetas, x, z = ik_actions.x_sweep() | ||
# np.save('ik_data''/x_sweep', thetas) | ||
|
||
assert np.allclose(thetas, np.load("ik_data" "/x_sweep.npy")) | ||
if PLOT: | ||
plt.scatter(x, z) | ||
plt.show() | ||
|
||
def test_y_sweep(self): | ||
""" | ||
Case 1: Standard case | ||
:return: None | ||
""" | ||
kinematic_data = KinematicData() | ||
ik_actions = IKActions(kinematic_data) | ||
thetas, y, z = ik_actions.y_sweep() | ||
# np.save('ik_data''/y_sweep', thetas) | ||
|
||
assert np.allclose(thetas, np.load("ik_data" "/y_sweep.npy")) | ||
if PLOT: | ||
plt.scatter(y, z) | ||
plt.show() | ||
|
||
def test_z_sweep(self): | ||
""" | ||
Case 1: Standard case | ||
:return: None | ||
""" | ||
kinematic_data = KinematicData() | ||
ik_actions = IKActions(kinematic_data) | ||
thetas, y, z = ik_actions.z_sweep() | ||
# np.save('ik_data''/z_sweep', thetas) | ||
|
||
assert np.allclose(thetas, np.load("ik_data" "/z_sweep.npy")) | ||
if PLOT: | ||
plt.scatter(y, z) | ||
plt.show() | ||
|
||
def test_ready(self): | ||
kinematic_data = KinematicData() | ||
ik_actions = IKActions(kinematic_data) | ||
configuration = ik_actions.ready() | ||
# np.save('ik_data''/ready', configuration) | ||
|
||
assert np.allclose(configuration, np.load("ik_data" "/ready.npy")) | ||
# import unittest | ||
# | ||
# import numpy as np | ||
# from matplotlib import pyplot as plt | ||
# from soccer_pycontrol.model.inverse_kinematics.ik_actions import IKActions | ||
# | ||
# PLOT = True | ||
# | ||
# | ||
# class TestIK(unittest.TestCase): | ||
# # TODO switch to placo for IK | ||
# def test_x_sweep(self): | ||
# """ | ||
# Case 1: Standard case | ||
# :return: None | ||
# """ | ||
# ik_actions = IKActions(kinematic_data) | ||
# thetas, x, z = ik_actions.x_sweep() | ||
# # np.save('ik_data''/x_sweep', thetas) | ||
# | ||
# assert np.allclose(thetas, np.load("ik_data" "/x_sweep.npy")) | ||
# if PLOT: | ||
# plt.scatter(x, z) | ||
# plt.show() | ||
# | ||
# def test_y_sweep(self): | ||
# """ | ||
# Case 1: Standard case | ||
# :return: None | ||
# """ | ||
# kinematic_data = KinematicData() | ||
# ik_actions = IKActions(kinematic_data) | ||
# thetas, y, z = ik_actions.y_sweep() | ||
# # np.save('ik_data''/y_sweep', thetas) | ||
# | ||
# assert np.allclose(thetas, np.load("ik_data" "/y_sweep.npy")) | ||
# if PLOT: | ||
# plt.scatter(y, z) | ||
# plt.show() | ||
# | ||
# def test_z_sweep(self): | ||
# """ | ||
# Case 1: Standard case | ||
# :return: None | ||
# """ | ||
# kinematic_data = KinematicData() | ||
# ik_actions = IKActions(kinematic_data) | ||
# thetas, y, z = ik_actions.z_sweep() | ||
# # np.save('ik_data''/z_sweep', thetas) | ||
# | ||
# assert np.allclose(thetas, np.load("ik_data" "/z_sweep.npy")) | ||
# if PLOT: | ||
# plt.scatter(y, z) | ||
# plt.show() | ||
# | ||
# def test_ready(self): | ||
# kinematic_data = KinematicData() | ||
# ik_actions = IKActions(kinematic_data) | ||
# configuration = ik_actions.ready() | ||
# # np.save('ik_data''/ready', configuration) | ||
# | ||
# assert np.allclose(configuration, np.load("ik_data" "/ready.npy")) |
Oops, something went wrong.