Skip to content
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c6cb0bd
otto v1.4.0 MCP
txp666 Jun 4, 2025
6f49f48
otto v1.4.1 gif as components
txp666 Jun 5, 2025
210d3aa
electronBot v1.1.0 mcp
txp666 Jun 5, 2025
971313d
Merge branch '78:main' into MCP_TEST
txp666 Jun 5, 2025
837150c
Merge branch '78:main' into main
txp666 Jun 5, 2025
009146c
Merge branch '78:main' into main
txp666 Jun 5, 2025
b632e33
规范代码
txp666 Jun 5, 2025
cc6adc5
Merge branch '78:main' into main
txp666 Jun 6, 2025
db3fc1d
Merge branch '78:main' into main
txp666 Jun 13, 2025
03c8ec6
fix(ota): 修复 ottoRobot和electronBot OTA 升级崩溃问题 bug
txp666 Jun 13, 2025
779bb5c
Merge branch '78:main' into main
txp666 Jun 13, 2025
9e67253
1.增加robot舵机初始位置校准
txp666 Jun 13, 2025
4057c30
Merge branch 'main' of https://github.com/txp666/xiaozhi-esp32
txp666 Jun 13, 2025
b982be8
Merge branch '78:main' into main
txp666 Sep 4, 2025
609cc09
Merge branch '78:main' into main
txp666 Sep 17, 2025
d9ab881
Merge branch '78:main' into main
txp666 Oct 5, 2025
97d747a
Merge branch '78:main' into main
txp666 Oct 29, 2025
ea93476
refactor: Update Electron and Otto emoji display implementations
txp666 Oct 31, 2025
e8539bc
Rename OTTO_ICON_FONT.c to otto_icon_font.c
txp666 Oct 31, 2025
76abfb7
Rename OTTO_ICON_FONT.c to otto_icon_font.c
txp666 Oct 31, 2025
9729cb0
refactor: Update Otto emoji display configurations and functionalities
txp666 Nov 1, 2025
5371821
Merge branch '78:main' into main
txp666 Nov 1, 2025
444ce5c
Merge branch 'dev'
txp666 Nov 2, 2025
ab53ff6
refactor: Update chat label long mode for Electron and Otto emoji dis…
txp666 Nov 2, 2025
816b26e
Update Otto robot README with new actions and parameters
txp666 Nov 2, 2025
ff9b8ce
Update Otto controller parameters for oscillation settings
txp666 Nov 3, 2025
36ae4e6
Merge branch 'main' of https://github.com/txp666/xiaozhi-esp32
txp666 Nov 3, 2025
9a4422c
Fix default amplitude initialization in Otto controller to use a sing…
txp666 Nov 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions main/boards/otto-robot/otto_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ class OttoController {
int amplitude[SERVO_COUNT] = {0};
int center_angle[SERVO_COUNT] = {0};
double phase_diff[SERVO_COUNT] = {0};
int period = 500; // 默认周期500毫秒
float steps = 5.0; // 默认步数5.0
int period = 300; // 默认周期300毫秒
float steps = 8.0; // 默认步数8.0

const char* servo_names[] = {"ll", "rl", "lf", "rf", "lh", "rh"};

// 读取振幅(短键名 "a"),默认20度
// 读取振幅(短键名 "a"),默认0度
for (int j = 0; j < SERVO_COUNT; j++) {
amplitude[j] = 20; // 默认振幅20度
amplitude[j] = 0; // 默认振幅0度
}
cJSON* amp_item = cJSON_GetObjectItem(osc_item, "a");
if (cJSON_IsObject(amp_item)) {
Expand Down Expand Up @@ -818,11 +818,17 @@ class OttoController {
"振荡模式:'osc'振荡器对象,包含'a'振幅对象(各舵机振幅10-90度,默认20度),'o'中心角度对象(各舵机振荡中心绝对角度0-180度,默认90度),'ph'相位差对象(各舵机相位差,度,0-360度,默认0度),'p'周期100-3000毫秒(默认500),'c'周期数0.1-20.0(默认5.0);"
"使用方式:AI可以连续多次调用此工具,每次发送一个序列,系统会自动排队按顺序执行。"
"重要说明:左右腿脚震荡的时候,有一只脚必须在90度,否则会损坏机器人,如果发送多个序列(序列数>1),完成所有序列后需要复位时,AI应该最后单独调用self.otto.home工具进行复位,不要在序列中设置复位参数。"
"示例:发送3个序列,最后调用复位:"
"普通模式示例:发送3个序列,最后调用复位:"
"第1次调用{\"sequence\":\"{\\\"a\\\":[{\\\"s\\\":{\\\"ll\\\":100},\\\"v\\\":1000}],\\\"d\\\":500}\"},"
"第2次调用{\"sequence\":\"{\\\"a\\\":[{\\\"s\\\":{\\\"ll\\\":90},\\\"v\\\":800}],\\\"d\\\":500}\"},"
"第3次调用{\"sequence\":\"{\\\"a\\\":[{\\\"s\\\":{\\\"ll\\\":80},\\\"v\\\":800}]}\"},"
"最后调用self.otto.home工具进行复位。",
"最后调用self.otto.home工具进行复位。"
"振荡器模式示例:"
"示例1-双臂同步摆动:{\"sequence\":\"{\\\"a\\\":[{\\\"osc\\\":{\\\"a\\\":{\\\"lh\\\":30,\\\"rh\\\":30},\\\"o\\\":{\\\"lh\\\":90,\\\"rh\\\":90},\\\"p\\\":500,\\\"c\\\":5.0}}],\\\"d\\\":0}\"};"
"示例2-双腿交替振荡(波浪效果):{\"sequence\":\"{\\\"a\\\":[{\\\"osc\\\":{\\\"a\\\":{\\\"ll\\\":20,\\\"rl\\\":20},\\\"o\\\":{\\\"ll\\\":90,\\\"rl\\\":90},\\\"ph\\\":{\\\"rl\\\":180},\\\"p\\\":600,\\\"c\\\":3.0}}],\\\"d\\\":0}\"};"
"示例3-单腿振荡配合固定脚(安全):{\"sequence\":\"{\\\"a\\\":[{\\\"osc\\\":{\\\"a\\\":{\\\"ll\\\":45},\\\"o\\\":{\\\"ll\\\":90,\\\"lf\\\":90},\\\"p\\\":400,\\\"c\\\":4.0}}],\\\"d\\\":0}\"};"
"示例4-复杂多舵机振荡(手和腿):{\"sequence\":\"{\\\"a\\\":[{\\\"osc\\\":{\\\"a\\\":{\\\"lh\\\":25,\\\"rh\\\":25,\\\"ll\\\":15},\\\"o\\\":{\\\"lh\\\":90,\\\"rh\\\":90,\\\"ll\\\":90,\\\"lf\\\":90},\\\"ph\\\":{\\\"rh\\\":180},\\\"p\\\":800,\\\"c\\\":6.0}}],\\\"d\\\":500}\"};"
"示例5-快速摇摆:{\"sequence\":\"{\\\"a\\\":[{\\\"osc\\\":{\\\"a\\\":{\\\"ll\\\":30,\\\"rl\\\":30},\\\"o\\\":{\\\"ll\\\":90,\\\"rl\\\":90},\\\"ph\\\":{\\\"rl\\\":180},\\\"p\\\":300,\\\"c\\\":10.0}}],\\\"d\\\":0}\"}。",
PropertyList({Property("sequence", kPropertyTypeString,
"{\"a\":[{\"s\":{\"ll\":90,\"rl\":90},\"v\":1000}]}")}),
[this](const PropertyList& properties) -> ReturnValue {
Expand Down