Skip to content

Commit 7a456ff

Browse files
Moved all locomotion policies to a proper place and added some new experimental ones. modified object detection to record inference time. added some intermidiate urdf with primitive collisions. Added primitives as the main collision to the main bez2 mjcf. Added classes so that the stls are used for visuals, this increases performance a lot. changed main body link from torso_2023 to torso. Split test_mujoco into walk, and perception for better organization. integrated the onnxcontroller as rl_walk and rl_walk_ros for better modularity. Added a gravity_vector to sensors. updated the ros layer to at least fill out the observation vector for the policy. Added joint state callbacks to motor control and calcuate joint velocities from angles. re-enabled orientation for the pose navigator. should be ready to deploy the policy.
1 parent fdf9787 commit 7a456ff

29 files changed

Lines changed: 1622 additions & 799 deletions

File tree

.idea/workspace.xml

Lines changed: 108 additions & 168 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

soccer_control/soccer_pycontrol/test/onnx/bez222_policy.onnx renamed to soccer_control/soccer_pycontrol/models/bez222_policy.onnx

File renamed without changes.
757 KB
Binary file not shown.

soccer_control/soccer_pycontrol/test/onnx/bez22_policy.onnx renamed to soccer_control/soccer_pycontrol/models/bez22_policy.onnx

File renamed without changes.
757 KB
Binary file not shown.
757 KB
Binary file not shown.

soccer_control/soccer_pycontrol/test/onnx/bez2_policy.onnx renamed to soccer_control/soccer_pycontrol/models/bez2_policy.onnx

File renamed without changes.

soccer_control/soccer_pycontrol/package.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010

1111
<depend>rclpy</depend>
1212
<depend>soccer_common</depend>
13-
13+
<depend>python3-onnxruntime-pip</depend>
14+
<depend>sensor_msgs</depend>
15+
<depend>geometry_msgs</depend>
16+
<depend>tf2_ros</depend>
1417
<export>
1518
<build_type>ament_python</build_type>
1619
</export>

soccer_control/soccer_pycontrol/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
("share/" + package_name + "/launch", glob("launch/*.launch")),
1818
("share/" + package_name + "/launch", glob("launch/*.yaml")),
1919
("share/" + package_name + "/launch", glob("launch/*.py")),
20+
("share/" + package_name + "/models", glob("models/*.onnx")),
2021
],
2122
maintainer="Jonathan Spraggett",
2223
maintainer_email="jonathanspraggett@gmail.com",
@@ -25,6 +26,7 @@
2526
entry_points={
2627
"console_scripts": [
2728
"soccer_walk = soccer_pycontrol.walk_engine.walk_engine_ros.navigator_ros:main",
29+
"soccer_rl_walk = soccer_pycontrol.walk_engine.walk_engine_ros.rl_walk_ros:main",
2830
],
2931
},
3032
)

soccer_control/soccer_pycontrol/soccer_pycontrol/model/bez.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ def __init__(
3232

3333
self.sensors = Sensors(self.world)
3434

35+
self.default_angles = np.array([-0.00038 ,0.00058
36+
,-0.44675 ,0.00074 ,2.50858
37+
,-0.02901 ,0.06566 ,0.87410 ,-1.54022 ,0.67634 ,-0.07002
38+
,-0.44962 ,-0.00074 ,2.50967
39+
,-0.01830 ,0.04949 ,0.85711 ,-1.54784 ,0.69839 ,-0.05164])
40+
self.default_leg_angles = np.array([-0.02901, 0.06566, 0.87410, -1.54022, 0.67634, -0.07002
41+
, -0.01830, 0.04949, 0.85711, -1.54784, 0.69839, -0.05164])
42+
3543
@property
3644
def status(self) -> BezStatusEnum:
3745
return self._status
@@ -40,6 +48,9 @@ def status(self) -> BezStatusEnum:
4048
def status(self, status: BezStatusEnum) -> None:
4149
self._status = status
4250

51+
def ready(self): # TODO fix default angles it leans
52+
self.motor_control.set_all_angles(self.default_angles)
53+
self.motor_control.set_motor()
4354
def get_parameters(self) -> dict:
4455
with open(
4556
expanduser("~")

0 commit comments

Comments
 (0)