mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-22 03:59:42 +00:00
fix style
This commit is contained in:
@@ -15,17 +15,19 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from lerobot.envs.utils import preprocess_observation
|
|
||||||
from lerobot.processor.pipeline import PolicyProcessorPipeline
|
|
||||||
from lerobot.processor.observation_processor import LiberoProcessorStep
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
from lerobot.envs.utils import preprocess_observation
|
||||||
|
from lerobot.processor.observation_processor import LiberoProcessorStep
|
||||||
|
from lerobot.processor.pipeline import PolicyProcessorPipeline
|
||||||
|
|
||||||
seed = 42
|
seed = 42
|
||||||
np.random.seed(seed)
|
np.random.seed(seed)
|
||||||
|
|
||||||
B = 5
|
B = 5
|
||||||
obs1 = {
|
obs1 = {
|
||||||
"pixels": {
|
"pixels": {
|
||||||
"image": (np.random.rand(B, 256, 256, 3) * 255).astype(np.uint8),
|
"image": (np.random.rand(B, 256, 256, 3) * 255).astype(np.uint8),
|
||||||
"image2": (np.random.rand(B, 256, 256, 3) * 255).astype(np.uint8),
|
"image2": (np.random.rand(B, 256, 256, 3) * 255).astype(np.uint8),
|
||||||
},
|
},
|
||||||
"robot_state": {
|
"robot_state": {
|
||||||
@@ -42,8 +44,8 @@ obs1 = {
|
|||||||
"joints": {
|
"joints": {
|
||||||
"pos": np.random.randn(B, 7),
|
"pos": np.random.randn(B, 7),
|
||||||
"vel": np.random.randn(B, 7),
|
"vel": np.random.randn(B, 7),
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
observation = preprocess_observation(obs1)
|
observation = preprocess_observation(obs1)
|
||||||
|
|||||||
Reference in New Issue
Block a user