(fix):ReplayBuffer to pass task_name directly to add_frame method; update gym_manipulator documentation to describe environment features and usage.
This commit is contained in:
@@ -547,7 +547,6 @@ class ReplayBuffer:
|
|||||||
repo_id=repo_id,
|
repo_id=repo_id,
|
||||||
fps=fps,
|
fps=fps,
|
||||||
root=root,
|
root=root,
|
||||||
robot=None, # TODO: (azouitine) Handle robot
|
|
||||||
robot_type=None,
|
robot_type=None,
|
||||||
features=features,
|
features=features,
|
||||||
use_videos=True,
|
use_videos=True,
|
||||||
@@ -588,11 +587,8 @@ class ReplayBuffer:
|
|||||||
else:
|
else:
|
||||||
frame_dict[f"complementary_info.{key}"] = val
|
frame_dict[f"complementary_info.{key}"] = val
|
||||||
|
|
||||||
# Add task field which is required by LeRobotDataset
|
|
||||||
frame_dict["task"] = task_name
|
|
||||||
|
|
||||||
# Add to the dataset's buffer
|
# Add to the dataset's buffer
|
||||||
lerobot_dataset.add_frame(frame_dict)
|
lerobot_dataset.add_frame(frame_dict, task=task_name)
|
||||||
|
|
||||||
# Move to next frame
|
# Move to next frame
|
||||||
frame_idx_in_episode += 1
|
frame_idx_in_episode += 1
|
||||||
|
|||||||
@@ -14,6 +14,28 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Robot Environment for LeRobot Manipulation Tasks
|
||||||
|
|
||||||
|
This module provides a comprehensive gym-compatible environment for robot manipulation
|
||||||
|
with support for:
|
||||||
|
- Multiple robot types (SO100, SO101, Koch and Moss)
|
||||||
|
- Human intervention via leader-follower control or gamepad
|
||||||
|
|
||||||
|
- End-effector and joint space control
|
||||||
|
- Image processing (cropping and resizing)
|
||||||
|
|
||||||
|
The environment is built using a composable wrapper pattern where each wrapper
|
||||||
|
adds specific functionality to the base RobotEnv.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
env = make_robot_env(cfg)
|
||||||
|
obs, info = env.reset()
|
||||||
|
action = policy.select_action(obs)
|
||||||
|
obs, reward, terminated, truncated, info = env.step(action)
|
||||||
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
|||||||
Reference in New Issue
Block a user