Go2Py_SIM/examples/fsm_sim.ipynb

69 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-03-18 11:36:53 +08:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
2024-03-18 11:36:53 +08:00
"metadata": {},
"outputs": [],
"source": [
"from Go2Py.sim.mujoco import Go2Sim\n",
"from Go2Py.robot.fsm import FSM\n",
"from Go2Py.robot.remote import KeyboardRemote\n",
"from Go2Py.robot.safety import SafetyHypervisor\n",
2024-03-18 11:36:53 +08:00
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
2024-03-18 11:36:53 +08:00
"metadata": {},
"outputs": [],
"source": [
"robot = Go2Sim()\n",
"remote = KeyboardRemote()\n",
"safety_hypervisor = SafetyHypervisor(robot)"
2024-03-18 11:36:53 +08:00
]
},
{
"cell_type": "code",
2024-04-06 03:59:21 +08:00
"execution_count": 3,
2024-03-18 11:36:53 +08:00
"metadata": {},
2024-04-06 03:59:21 +08:00
"outputs": [],
2024-03-18 11:36:53 +08:00
"source": [
"robot.sitDownReset()\n",
"fsm = FSM(robot, remote, safety_hypervisor)"
2024-03-18 11:36:53 +08:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fsm.close()"
2024-03-18 11:36:53 +08:00
]
}
],
"metadata": {
"kernelspec": {
"display_name": "b1-env",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
}
},
"nbformat": 4,
"nbformat_minor": 2
}