File tree Expand file tree Collapse file tree
src/bitbots_rl_walk/bitbots_rl_walk Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import numpy as np
2222import onnxruntime as rt
2323from ament_index_python import get_package_share_directory
24- from geometry_msgs .msg import PoseStamped , Twist
24+ from geometry_msgs .msg import Twist
2525from rclpy .node import Node
2626from sensor_msgs .msg import Imu , JointState
27+ from soccer_vision_3d_msgs .msg import BallArray
2728from transforms3d .euler import euler2mat
2829from transforms3d .quaternions import quat2mat
2930
3031from bitbots_msgs .msg import JointCommand
3132
32- from soccer_vision_3d_msgs . msg import Ball , BallArray
33-
34- ONNX_MODEL = os . path . join ( get_package_share_directory ( "bitbots_rl_walk" ), "models" , "wolfgang_forward_kick_better_ball_ppo.onnx" )
33+ ONNX_MODEL = os . path . join (
34+ get_package_share_directory ( "bitbots_rl_walk" ), "models" , "wolfgang_forward_kick_better_ball_ppo.onnx"
35+ )
3536
3637WALKREADY_STATE = np .array (
3738 [
@@ -199,7 +200,7 @@ def _timer_callback(self):
199200
200201 phase = np .array ([np .cos (self ._phase ), np .sin (self ._phase )], dtype = np .float32 ).flatten ()
201202
202- command = np .zeros (3 )
203+ # command = np.zeros(3)
203204
204205 rel_ball_pos = np .array (
205206 [
@@ -213,7 +214,7 @@ def _timer_callback(self):
213214 [
214215 gyro , # 3
215216 gravity , # 4
216- command , # 3
217+ # command, # 3
217218 joint_angles , # 18
218219 joint_velocities , # 18
219220 self ._previous_action , # 18 # Previous action
You can’t perform that action at this time.
0 commit comments