turtlebot3-burger_150.png
turtlebot3-waffle-pi_150.png
turtlebot3-arm_150.png
walking-y2_150.png
turbot3-multi_150.png
turbot3-dl-ros1_150.png
turbot3-ai.png
turbot3-dl-ros2_150.png
turbot3-slam_150.png
turbot3-arm_150.png
turtlebot4-lite_150.png
turtlebot4-pro_150.png
turbot4-dl_150.png
turbot4-ai_150.png
aidriving-racebot_150.png
aidriving-autodrive_150.png
turtlebot-arm_150.png
openmanipulator-x_150.png
Home » 智能台灯LeLamp快速入门教程 » 智能台灯LeLamp快速入门教程-舵机限位校准与测试

智能台灯LeLamp快速入门教程-舵机限位校准与测试

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号

文章说明

  • 本教程主要说明介绍如何进行舵机限位校准和测试

操作步骤

舵机限位校准

  • 装配完整个舵机结构之后,就可以设置舵机的限位校准
  • your_lamp_name为当前自己定义的设备名称, the_port_found_in_previous_step为当前驱动板的端口
$ uv run -m lelamp.calibrate --id your_lamp_name --port the_port_found_in_previous_step
  • lelamp零位位置zero position

lelamp-zeroposition.png

  • 启动程序,会进行两次校准,第一次针对lelamp_follower,第二次针对lelamp_leader。按C键,和按Enter键,开始校准。逐一转动舵机,确定舵机的左右方向的限位,在终端输出上可以看到具体数值,最大最小值和开始时的位置
$ cd ~/lelamp_ws/lelamp_runtime
$ uv run -m lelamp.calibrate --id lelamp1 --port /dev/ttyACM0

==================================================
FOLLOWER CALIBRATION
==================================================
INFO:__main__:Starting follower calibration for lamp ID: lelamp1 on port: /dev/ttyACM0
INFO:lelamp.follower.lelamp_follower:lelamp1 LeLampFollower connected.
Press ENTER to use provided calibration file associated with the id lelamp1, or type 'c' and press ENTER to run calibration: c
INFO:lelamp.follower.lelamp_follower:
Running calibration of lelamp1 LeLampFollower
Move lelamp1 LeLampFollower to the middle of its range of motion and press ENTER....
Move all joints sequentially through their entire ranges of motion.
Recording positions. Press ENTER to stop...

-------------------------------------------
-------------------------------------------
NAME            |    MIN |    POS |    MAX
base_yaw        |    933 |   1997 |   3452
base_pitch      |   1002 |   2088 |   3168
elbow_pitch     |    824 |   2003 |   3068
wrist_roll      |    951 |   2103 |   3269
wrist_pitch     |    832 |   1936 |   3242
Calibration saved to /home/raspios/.cache/huggingface/lerobot/calibration/robots/lelamp_follower/lelamp1.json
INFO:__main__:Follower calibration completed successfully
INFO:lelamp.follower.lelamp_follower:lelamp1 LeLampFollower disconnected.

==================================================
LEADER CALIBRATION
==================================================
INFO:__main__:Starting leader calibration for lamp ID: lelamp1 on port: /dev/ttyACM0
INFO:lelamp.leader.lelamp_leader:lelamp1 LeLampLeader connected.
Press ENTER to use provided calibration file associated with the id lelamp1, or type 'c' and press ENTER to run calibration: c
INFO:lelamp.leader.lelamp_leader:
Running calibration of lelamp1 LeLampLeader
Move lelamp1 LeLampLeader to the middle of its range of motion and press ENTER....
Move all joints sequentially through their entire ranges of motion.
Recording positions. Press ENTER to stop...

-------------------------------------------
NAME            |    MIN |    POS |    MAX
base_yaw        |    678 |   1950 |   2915
base_pitch      |   1033 |   1962 |   2933
elbow_pitch     |    762 |   3101 |   3111
wrist_roll      |    810 |   1976 |   3243
wrist_pitch     |    983 |   1977 |   3329
wrist_pitch     |    983 |   1977 |   3329
Calibration saved to /home/raspios/.cache/huggingface/lerobot/calibration/teleoperators/lelamp_leader/lelamp1.json
INFO:__main__:Leader calibration completed successfully
INFO:lelamp.leader.lelamp_leader:lelamp1 LeLampLeader disconnected.

==================================================
CALIBRATION COMPLETED SUCCESSFULLY
==================================================
  • 校准完成好,校准文件会保存在目录/home/raspios/.cache/huggingface/lerobot/calibration/robots/lelamp_follower/lelamp1.json/home/raspios/.cache/huggingface/lerobot/calibration/teleoperators/lelamp_leader/lelamp1.json

舵机测试

  • 舵机测试的命令例程
$ uv run -m lelamp.test.test_motors --id your_lamp_name --port port_your_servo_driver_is_connected_to
  • your_lamp_name为当前自己定义的设备名称, the_port_found_in_previous_step为当前驱动板的端口

  • 舵机运行测试程序之后,舵机会转动你到你设置的限位值,然后解除扭矩控制

$ cd ~/lelamp_ws/lelamp_runtime 
$ uv run -m lelamp.test.test_motors --id lelamp1 --port /dev/ttyACM0 
Testing Motors Service...
Getting available recordings...
Available recordings: ['curious', 'excited', 'happy_wiggle', 'headshake', 'idle', 'nod', 'sad', 'scanning', 'shock', 'shy', 'wake_up']
Playing first recording: curious
Playback completed!
Motors Service test completed!

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号


标签: none