Add docstrings

This commit is contained in:
Simon Alibert
2025-05-11 12:45:22 +02:00
parent 64303781c2
commit 307823bc8d
6 changed files with 102 additions and 1 deletions

View File

@@ -12,6 +12,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Records a dataset. Actions for the robot can be either generated by teleoperation or by a policy.
Example:
```shell
python -m lerobot.record \
--robot.type=so100_follower \
--robot.port=/dev/tty.usbmodem58760431541 \
--robot.cameras="{laptop: {type: opencv, camera_index: 0, width: 640, height: 480}}" \
--robot.id=black \
--teleop.type=so100_leader \
--teleop.port=/dev/tty.usbmodem58760431551 \
--teleop.id=blue \
--dataset.repo_id=aliberts/record-test \
--dataset.num_episodes=2 \
--dataset.single_task="Grab the cube"
```
"""
import logging
import time
from dataclasses import asdict, dataclass