diff --git a/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide-en.md b/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide-en.md index 827da461bfd..0b59c601ec7 100644 --- a/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide-en.md +++ b/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide-en.md @@ -49,6 +49,7 @@ Steps: 6. The VESC will reboot automatically after upload. 7. Reconnect and continue using it. +![Firmware - Custom File tab for manual upload](/assets/img/posts/vesc-firmware-upgrade-guide/custom-file-upload.webp) --- @@ -60,6 +61,8 @@ If your PC is online, you can use the built-in **Firmware Archive** feature in V - It automatically detects your hardware and matches compatible firmware. - The default selection is the latest version, so **manually switch it to 6.05**. +![Firmware - Archive tab with version 6.05 selected](/assets/img/posts/vesc-firmware-upgrade-guide/archive-firmware-select.webp) + ## Wrap-up The newest firmware is not always the most stable. For competition and research platforms, **6.05 remains a reasonable, well-tested choice**. After upgrading, re-check motor and sensor settings, as they can be reset during the process. diff --git a/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide.md b/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide.md index be80aa3fb24..1943ca62f27 100644 --- a/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide.md +++ b/_posts/2026-01-05-vesc-firmware-upgrade-guide/2026-01-05-vesc-firmware-upgrade-guide.md @@ -49,6 +49,7 @@ VESC 공식 펌웨어 아카이브는 아래 GitHub 저장소에서 관리됩니 6. 업로드가 끝나면 VESC가 자동으로 재부팅됩니다. 7. 재부팅 후 다시 연결해 사용합니다. +![Firmware - Custom File 탭에서 펌웨어 업로드](/assets/img/posts/vesc-firmware-upgrade-guide/custom-file-upload.webp) --- @@ -60,6 +61,8 @@ PC가 인터넷에 연결된 상태라면 VESC Tool의 **Firmware Archive 기능 - VESC 하드웨어를 자동으로 인식해 호환 펌웨어를 매칭해 줍니다. - 기본값은 최신 버전이므로 **Version을 수동으로 6.05로 변경**하는 것을 추천합니다. +![Firmware - Archive 탭에서 6.05 버전 선택](/assets/img/posts/vesc-firmware-upgrade-guide/archive-firmware-select.webp) + ## 마무리 최신 펌웨어가 항상 가장 안정적인 것은 아닙니다. 특히 대회용 차량이나 연구용 플랫폼에서는 **검증된 6.05 버전이 합리적인 선택**이 됩니다. 업그레이드 후에는 모터 및 센서 설정이 초기화될 수 있으므로, 반드시 설정을 다시 확인하고 적용하시기 바랍니다. diff --git a/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration-en.md b/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration-en.md index 5528bebdad0..f8b7e90324f 100644 --- a/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration-en.md +++ b/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration-en.md @@ -63,7 +63,7 @@ $$ ### ERPM gain calculation $$ -\text{speed_to_erpm_gain} = \frac{\text{pole_pairs} \cdot \text{gear_ratio}}{2\pi \cdot \text{wheel_radius}} +\text{speed_to_erpm_gain} = \frac{60 \cdot \text{pole_pairs} \cdot \text{gear_ratio}}{2\pi \cdot \text{wheel_radius}} $$ Plugging in the values gives a theoretical speed_to_erpm_gain of **~7520** for the Traxxas Fiesta + Velineon setup. Update the value in `vesc.yaml` accordingly. @@ -88,11 +88,22 @@ This is the most direct and accurate method. 3. Measure the time for one full rotation using the high‑speed video. 4. Compute the actual speed from rotation time and wheel circumference. +**Calculation example** + +| Item | Value | +|------|-------| +| Commanded speed | 1.0 m/s | +| Time for 1 rotation | 0.25 sec | +| Wheel circumference | 0.314m (radius 0.05m) | +| Actual speed | 0.314 / 0.25 = 1.256 m/s | + +In this case, the actual speed (1.256 m/s) is higher than the commanded speed (1.0 m/s), so the gain should be decreased. + **Adjusting gain** -- If actual speed is higher than commanded, increase the gain. -- If actual speed is lower, decrease the gain. +- If actual speed is higher than commanded, decrease the gain. +- If actual speed is lower, increase the gain. -### Method 2: Odometry (noisy, not recommended) +### Method 2: Odometry (very noisy, not recommended) This method uses ROS odometry. @@ -109,17 +120,17 @@ This method uses ROS odometry. **Calibration formula** $$ -\text{new\_gain} = \text{old\_gain} \times \frac{\text{actual\_distance}}{\text{odom\_distance}} +\text{new_gain} = \text{old_gain} \times \frac{\text{odom_distance}}{\text{actual_distance}} $$ For example, if old gain is 7520 and odom shows 5.5 m while the actual distance is 5 m: $$ -\text{new\_gain} = 7520 \times \frac{5.0}{5.5} \approx 6840 +\text{new_gain} = 7520 \times \frac{5.5}{5.0} \approx 8272 $$ Repeat until odom distance matches the actual distance. ## Wrap-up -ERPM gain calibration is fundamental for accurate speed control and odometry in autonomous vehicles. If calibration is off, odometry drift can accumulate and cause path deviations or accidents. Take the time to measure carefully and tune the gain precisely. +ERPM gain calibration is fundamental for accurate speed control and odometry in autonomous vehicles. If calibration is off, odometry drift can accumulate and cause localization failures and other accidents. Take the time to measure carefully and tune the gain precisely. diff --git a/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration.md b/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration.md index c41bef9ad49..888cdcf985b 100644 --- a/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration.md +++ b/_posts/2026-02-03-erpm-gain-calibration/2026-02-03-erpm-gain-calibration.md @@ -9,8 +9,8 @@ image: lang: ko lang_ref: erpm-gain-calibration math: true +recommended : true --- - 모터를 Throttle 제어가 아닌 속도를 활용해 제어할 때, 사용자의 명령을 하드웨어 조합에 맞게 적절히 변환하는 비례 상수를 찾는 것은 매우 중요합니다. 해당 상수는 자율 주행에서 위치 추정 오차 누적의 원인이 되며, 잘못된 제어로 사고를 유발할 수 있습니다. 이 글에서는 ERPM 게인의 개념과 이론적 계산 방법, 그리고 실험을 통한 캘리브레이션 방법을 정리했습니다. ## ERPM이란? @@ -43,14 +43,14 @@ Traxxas Fiesta 차량에 Velineon 모터 조합으로 이론적 ERPM 게인을 ### 하드웨어 스펙 -| 항목 | 값 | -| --- | --- | -| 모터 | Traxxas Velineon 3500 (4극) | -| 극 쌍수 (pole_pairs) | 2 | -| 피니언-스퍼 기어비 | 12 : 83 | -| 디퍼런셜-샤프트 기어비 | 13 : 37 | -| 바퀴 지름 | 10cm | -| 바퀴 반지름 (wheel_radius) | 0.05m | +| 항목 | 값 | +| -------------------------- | --------------------------- | +| 모터 | Traxxas Velineon 3500 (4극) | +| 극 쌍수 (pole_pairs) | 2 | +| 피니언-스퍼 기어비 | 12 : 83 | +| 디퍼런셜-샤프트 기어비 | 13 : 37 | +| 바퀴 지름 | 10cm | +| 바퀴 반지름 (wheel_radius) | 0.05m | ### 기어비 계산 @@ -63,7 +63,7 @@ $$ ### ERPM 게인 계산 $$ -\text{speed_to_erpm_gain} = \frac{\text{pole_pairs} \cdot \text{gear_ratio}}{2\pi \cdot \text{wheel_radius}} +\text{speed_to_erpm_gain} = \frac{60 \cdot \text{pole_pairs} \cdot \text{gear_ratio}}{2\pi \cdot \text{wheel_radius}} $$ 위 값을 대입하면 Traxxas Fiesta + Velineon 조합의 이론적 speed_to_erpm_gain 값은 **약 7520**입니다. `vesc.yaml`에 기록된 speed_to_erpm_gain 값을 변경해 사용하면 됩니다. @@ -77,49 +77,73 @@ $$ 가장 직관적이고 정확한 방법입니다. **준비물** -- 초고속 카메라(스마트폰 슬로모션 기능도 가능) + +- 초고속 카메라(스마트폰 슬로우 모션 기능도 가능) - 바퀴에 부착할 마커(테이프 등) ![테이프가 부착된 타이어](/assets/img/posts/erpm-gain-calibration/tire-marker.png) **측정 순서** + 1. 바퀴에 회전수 측정용 표시를 합니다. 2. 일정한 속도 명령을 줍니다. (PID 튜닝이 되어 있어야 일정한 속도 유지가 가능합니다.) 3. 초고속 카메라로 바퀴가 한 바퀴 도는 시간을 측정합니다. 4. 측정된 시간과 바퀴 둘레로 실제 속도를 계산합니다. **보정 방법** -- 명령한 속도보다 실제 속도가 빠르면 gain 값을 높입니다. -- 느리면 gain 값을 낮춥니다. -### 방법 2: Odometry 활용 (노이즈 가능, 비추천) +- 명령한 속도보다 실제 속도가 빠르면 gain 값을 낮춥니다. +- 느리면 gain 값을 높입니다. + +**계산 예시** + +| 항목 | 값 | +| --------------- | -------------------------- | +| 명령한 속도 | 1.0 m/s | +| 바퀴 1회전 시간 | 0.25초 | +| 바퀴 둘레 | 0.314m (반지름 0.05m 기준) | +| 실제 속도 | 0.314 / 0.25 = 1.256 m/s | + +이 경우 실제 속도(1.256 m/s)가 명령한 속도(1.0 m/s)보다 빠르므로, gain을 낮춰야 합니다. + +### 방법 2: Odometry 활용 (노이즈 많음, 비추천) ROS 토픽으로 캘리브레이션하는 방법입니다. **준비물** + - 줄자 또는 측정 도구 - 출발선 마킹용 테이프 - Servo Offset Tuning이 완료된 차량 **측정 순서** + 1. 차량 출발 지점을 마킹합니다. 2. `/vesc/odom` 토픽의 position 값을 0으로 초기화하거나 기록합니다. 3. 일정 거리(예: 5m)를 저속으로 직진 주행합니다. 4. 실제 이동 거리와 `/vesc/odom` 토픽 상의 이동 거리를 비교합니다. +**보정 방법** + +| 상황 | 조치 | +| --------------------- | ---------------- | +| odom 거리 > 실제 거리 | gain 값을 높인다 | +| odom 거리 < 실제 거리 | gain 값을 낮춘다 | + **보정 공식** + $$ -\text{new\_gain} = \text{old\_gain} \times \frac{\text{actual\_distance}}{\text{odom\_distance}} +\text{new_gain} = \text{old_gain} \times \frac{\text{odom_distance}}{\text{actual_distance}} $$ 예를 들어 기존 gain이 7520이고, odom이 5.5m를 표시했는데 실제로는 5m를 이동했다면 다음과 같이 보정합니다. $$ -\text{new\_gain} = 7520 \times \frac{5.0}{5.5} \approx 6840 +\text{new_gain} = 7520 \times \frac{5.5}{5.0} \approx 8272 $$ 이 과정을 odom 거리와 실제 거리가 일치할 때까지 반복합니다. ## 마무리 -ERPM 게인 캘리브레이션은 자율 주행 차량의 정밀한 속도 제어와 위치 추정의 기반이 되는 중요한 과정입니다. 캘리브레이션이 정확하지 않으면 Odometry 오차가 누적되어 경로 이탈이나 사고로 이어질 수 있으므로, 시간을 들여 정확하게 측정하기를 권장합니다. +ERPM 게인 캘리브레이션은 자율 주행 차량의 정밀한 속도 제어와 위치 추정의 기반이 되는 중요한 과정입니다. 캘리브레이션이 정확하지 않으면 Odometry 오차가 누적되어 위치 추정 실패 등의 사고로 이어질 수 있으므로, 시간을 들여 정확하게 측정하기를 권장합니다. diff --git a/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter-en.md b/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter-en.md index 82b300850de..3cba796362b 100644 --- a/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter-en.md +++ b/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter-en.md @@ -17,9 +17,9 @@ In autonomous driving, precise steering control directly affects path following In the VESC ROS package, steering commands are input as steering angles in radians and converted to values between 0 and 1 that the servo understands. This conversion relationship can be represented by gain and offset as follows: -``` -servo_value = steering_angle_to_servo_gain × steering_angle + steering_angle_to_servo_offset -``` +$$ +\text{servo_value} = \text{steering_angle_to_servo_gain} \times \text{steering_angle} + \text{steering_angle_to_servo_offset} +$$ - **steering_angle**: Steering angle input by the user (radians) - **servo_value**: Command delivered to the servo (0 ~ 1) diff --git a/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter.md b/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter.md index 22e7bb5c0c5..65a198eb11f 100644 --- a/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter.md +++ b/_posts/2026-02-03-servo-parameter/2026-02-03-servo-parameter.md @@ -10,16 +10,15 @@ lang: ko lang_ref: servo-parameter math: true --- - 자율 주행에서 정확한 조향 제어는 경로 추종 성능에 직접적인 영향을 미칩니다. 조향 명령과 실제 바퀴 각도 사이의 변환이 정확하지 않으면, 차량은 의도한 경로를 따라가지 못하고 경로 이탈이나 사고로 이어질 수 있습니다. 본 포스트에서는 Servo Parameter의 개념과 특성, 그리고 실험을 통한 캘리브레이션 방법을 정리합니다. ## Servo Parameter란? VESC ROS 패키지에서 조향 명령은 라디안 단위의 조향각으로 입력되며, 이를 서보가 이해하는 0에서 1 사이의 값으로 변환하여 전달합니다. 이 변환 관계는 다음과 같이 gain과 offset으로 나타낼 수 있습니다. -``` -servo_value = steering_angle_to_servo_gain × steering_angle + steering_angle_to_servo_offset -``` +$$ +\text{servo_value} = \text{steering_angle_to_servo_gain} \times \text{steering_angle} + \text{steering_angle_to_servo_offset} +$$ - **steering_angle**: 사용자가 입력하는 조향각 (라디안) - **servo_value**: 서보에 전달되는 명령 (0 ~ 1) @@ -34,9 +33,9 @@ ERPM gain의 경우, 기어비, 극 쌍수, 바퀴 반지름 등의 하드웨어 ### Ackermann Steering Geometry란? -차량이 회전할 때, 앞바퀴 두 개는 회전 중심으로부터 서로 다른 거리에 위치합니다. 내측 바퀴는 회전 중심에 가깝고, 외측 바퀴는 멀습니다. +차량이 회전할 때 두 앞바퀴는 회전 중심으로부터 서로 다른 거리에 위치합니다. 내측 바퀴는 회전 중심에 가깝고, 외측 바퀴는 멉니다. -바퀴는 축에 수직인 방향으로만 순수하게 굴러갈 수 있습니다. 만약 두 앞바퀴가 같은 조향각으로 꺾이면, 두 바퀴 축의 연장선이 서로 평행해지고, 각 바퀴의 회전 반경이 달라지며 옆으로 끌려가는 슬립이 발생합니다. +바퀴는 축에 수직인 방향으로만 순수하게 굴러갈 수 있습니다. 만약 두 앞바퀴가 같은 조향각으로 꺾이면, 두 바퀴 축의 연장선이 서로 평행해지고, 각 바퀴의 회전 중심이 달라지며 옆으로 끌려가는 슬립이 발생합니다. 이를 방지하기 위해, 두 바퀴 축의 연장선이 동일한 회전 중심에서 만나도록 내측 바퀴는 더 크게, 외측 바퀴는 더 작게 꺾어야 합니다. 이러한 기하학적 조건을 **Ackermann Steering Geometry**라고 합니다. @@ -45,11 +44,11 @@ _Ackermann Steering Geometry_ ### Bellcrank 시스템의 비선형성 -RC카에서는 bellcrank 시스템과 타이로드, 너클 암 등의 링키지를 통해 Ackermann Steering Geometry를 근사적으로 구현합니다. 이 복잡한 기구학적 구조로 인해, 서보 각도와 실제 바퀴 조향각 사이의 관계는 **비선형**입니다. +RC카에서는 bellcrank 시스템과 타이로드, 너클 암 등의 링키지를 통해 Ackermann Steering Geometry를 근사적으로 구현합니다. 이 복잡한 기구학적 구조로 인해, 서보 각도와 실제 바퀴 조향각 사이의 관계는 **비선형적**입니다. | ![Traxxas Bellcrank](/assets/img/posts/servo-parameter/traxxas-bellcrank.png) | ![Traxxas Ackermann](/assets/img/posts/servo-parameter/traxxas-ackermann.png) | -|:---:|:---:| -| Traxxas Fiesta의 조향 시스템 (Bellcrank) | Traxxas Fiesta의 Ackermann Steering Geometry | +| :-------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | +| Traxxas Fiesta의 조향 시스템 (Bellcrank) | Traxxas Fiesta의 Ackermann Steering Geometry | 즉, 우리가 설정하는 `steering_angle_to_servo_gain`은 사실 선형 근사이며, 중앙(직진) 부근에서는 잘 맞지만 최대 조향각 부근에서는 오차가 발생할 수 있습니다. 따라서 Servo Parameter는 이론적 계산보다 실험을 통해 자주 사용하는 범위에 맞게 캘리브레이션하는 것이 일반적입니다. @@ -67,7 +66,7 @@ RC카에서는 bellcrank 시스템과 타이로드, 너클 암 등의 링키지 ### 서보 혼 초기 위치의 중요성 -servo gain과 offset이 적용된 상태에서 하드웨어의 한계까지 조향 명령을 주었을 때, 좌측이나 우측 한 방향으로만 제약되지 않도록 주의해야 합니다. 즉, 최대 조향 명령을 주어도 서보 명령은 항상 0에서 1 사이에 존재해야 합니다. +servo gain과 offset이 적용된 상태에서 하드웨어의 한계까지 조향 명령을 주었을 때, 좌측이나 우측 한 방향으로만 하드웨어의 한계치에 제약되지 않도록 주의해야 합니다. 즉, 최대 조향 명령을 주어도 서보 명령은 항상 0에서 1 사이에 존재해야 합니다. 이를 위해 서보 혼 초기 위치를 가동범위 중앙에 잘 위치시키는 것이 중요합니다. 서보 혼이 잘 장착된 경우, offset은 0.5에 근접하게 측정됩니다. @@ -86,7 +85,7 @@ offset은 조향각 0일 때의 서보 값입니다. 바퀴가 정확히 직진 5. 차량이 정확히 직진할 때의 값을 `steering_angle_to_servo_offset`으로 설정합니다. > 서보 혼이 잘 장착되어 있다면 offset은 0.5 근처가 됩니다. 만약 0.5에서 크게 벗어난다면, 서보 혼을 분리 후 재장착하여 중앙에 맞추는 것을 권장합니다. -{: .prompt-tip } +> {: .prompt-tip } ### Gain 찾기 @@ -97,7 +96,7 @@ gain은 조향각 변화에 따른 서보 값 변화의 비율입니다. rviz에 Ackermann steering geometry에서 조향각과 회전반경의 관계는 다음과 같습니다. wheelbase는 앞 차축과 뒷 차축 사이의 거리로, 자를 통해 직접 측정하거나, 제조사에 적혀있는 정보를 참고하면 됩니다. $$ -\text{turning_radius} = \frac{\text{wheelbase}}{\tan(\text{steering_angle})} +\text{turning_radius(R)} = \frac{\text{wheelbase}}{\tan(\text{steering_angle})} $$ 명령한 조향각으로 예상 회전반경을 계산하고, 실제 측정된 회전반경과 비교하여 gain을 조정합니다. @@ -114,19 +113,19 @@ _Rviz를 통해 회전 반경을 측정하는 모습_ ### 계산 예시 (Traxxas Fiesta 기준) -| 항목 | 값 | -|------|-----| -| 휠베이스 | 0.33m | -| 명령한 조향각 | 0.2 rad | -| 예상 회전반경 | 0.33 / tan(0.2) ≈ 1.62m | -| 실제 측정된 회전반경 | 1.8m | +| 항목 | 값 | +| -------------------- | ------------------------ | +| 휠베이스 | 0.33m | +| 명령한 조향각 | 0.2 rad | +| 예상 회전반경 | 0.33 / tan(0.2) ≈ 1.62m | +| 실제 측정된 회전반경 | 1.8m | 이 경우, 예상(1.62m)보다 실제(1.8m)가 크므로 실제 조향각이 명령보다 작다는 의미입니다. 따라서 gain의 절댓값을 늘려야 합니다. ### 보정 방법 -| 상황 | 조치 | -|------|------| +| 상황 | 조치 | +| ----------------------------- | ---------------------- | | 실제 회전반경 > 예상 회전반경 | gain의 절댓값을 늘린다 | | 실제 회전반경 < 예상 회전반경 | gain의 절댓값을 줄인다 | diff --git a/assets/img/posts/vesc-firmware-upgrade-guide/archive-firmware-select.webp b/assets/img/posts/vesc-firmware-upgrade-guide/archive-firmware-select.webp new file mode 100644 index 00000000000..8104642f2b5 Binary files /dev/null and b/assets/img/posts/vesc-firmware-upgrade-guide/archive-firmware-select.webp differ diff --git a/assets/img/posts/vesc-firmware-upgrade-guide/custom-file-upload.webp b/assets/img/posts/vesc-firmware-upgrade-guide/custom-file-upload.webp new file mode 100644 index 00000000000..62d6ee4049e Binary files /dev/null and b/assets/img/posts/vesc-firmware-upgrade-guide/custom-file-upload.webp differ