Skip to content

Commit bbcb1f1

Browse files
committed
testable stated (PhaseObject + ReadMe)
1 parent 7fa2e90 commit bbcb1f1

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## General
2+
3+
The package contains a framework which is a capsule for the application of policies on a robot.
4+
5+
## Framework structure
6+
7+
The code is divided in five sections: Configs, Handlers, Models, Nodes and rest.
8+
9+
The Models-folder contains all policy models. Node, the framework expects that policies are in .onnx-format.
10+
11+
The Nodes-folder contains all relevant ROS-Nodes regarding policy models. These nodes are responsible for starting the policies correctly, feeding them with correct data and publishing their outputs correctly.
12+
The name of the node describes for which kind of policy it is suitable.
13+
The RL Node is a special case. All other nodes are kids of the RL Node. It centralizes the execution loop and minimizes boiler plate code.
14+
15+
The Handlers-folder contains all handlers. A handler is a specific type of object which is responsible for processing external data such that they are comprehensible for the policy models. All handlers are kids of the Handler class.
16+
17+
The Configs-folder contains all robot/policy specific configurations. Files in the Configs-folder should be in .yaml-format.
18+
19+
phase.py and policy_nodes.py are two files, which do not fall in any of the aforementioned categories.
20+
phase.py defines a PhaseObject, which is responsible for the phase management. policy_nodes.py can be looked as the launch file. It defines, which nodes and policies will be used.
21+
Both files are located in the bitbots_rl_motion folder.
22+
23+
## Execution
24+
25+
For proper starting you need a policy model and a config file. The config file should have the same structure as the wolfgang_config.yaml file.
26+
Furthermore, you have to create or adjust a node file to your needs. walk_node.py can be used for orientation. If chages are conducted on the RL_Node class, it should be announced.
27+
Finally, you define which nodes and policies you wanna use in the policy_nodes.py file.
28+
29+
30+
31+

src/bitbots_motion/bitbots_rl_motion/handlers/phase_handler.py renamed to src/bitbots_motion/bitbots_rl_motion/bitbots_rl_motion/phase.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import numpy as np
2-
from bitbots_rl_motion.handlers.handler import Handler
32

3+
# Please pay attention to the code in rl_node.py if you wanna change here sth.
44

5-
class PhaseHandler(Handler):
5+
6+
class PhaseObject:
67
_phase: np.ndarray = np.array([0.0, np.pi], dtype=np.float32)
78
_phase_dt: float
89

0 commit comments

Comments
 (0)