Code Monkey home page Code Monkey logo

rcb4's Introduction

rcb4

For JSK Users

Worm Gear Module Calibration Tool

armh7-tools provides a comprehensive solution for calibrating and managing worm gear modules connected via the ARMH7Interface. It facilitates the calibration of worm gears, reading of calibrated sensor data, and real-time display of sensor and worm gear values. Designed for flexibility, it supports operations like calibration data update and in-place modification of YAML configuration files.

YAML Configuration Format

The calibration tool requires an input YAML file for worm gear modules configuration. This file contains a list of worm gears with their associated parameters: worm_id, servo_id, sensor_id, and initial magnetic encoder value magenc_init. Each worm gear is represented by a line in the YAML file with its parameters encapsulated in curly braces and prefixed by a dash, indicating a list item in YAML syntax.

 - {worm_id: 0, servo_id: 0, sensor_id: 38, magenc_init: 6502}
 - {worm_id: 1, servo_id: 2, sensor_id: 40, magenc_init: 3039}
 - {worm_id: 3, servo_id: 6, sensor_id: 44, magenc_init: 9502}

Reading Worm Gear Modules's calibration data

armh7-tools read-calib [--device DEVICE] output_file_path

--device, -d: Specify the device port. (Default: None) output_file_path: Path to output the YAML file with calibration data.

Example
armh7-tools read-calib ./worm_calib.yaml

Calibrate Worm Gear Modules

armh7-tools calibrate [--device DEVICE] file_path [--inplace] [--update] [--output OUTPUT]

--device, -d: Specify the device port. (Default: None) file_path: Path to the input YAML file containing worm gear configurations. --inplace, -i: Overwrite the input YAML file with calibration results. (Optional) --update, -u: Ignore and overwrite the current magenc_init values in the input YAML. (Optional) --output, -o: Specify a path to save the calibrated data if not overwriting in-place. (Optional)

Example

When the update option is specified, the current posture of the robot will be modified, and upon pressing the Enter key, the angle at that moment will be set as the zero point. Consequently, the magenc_init value will be updated and written to the board,

armh7-tools calibrate ./worm_calib.yaml --update

Print Sensor Values

This command displays real-time sensor values in a table format.

armh7-tools print-sensor
+------|----------|--------------|--------------|--------------|--------------|----------|----------|----------|----------+
|   ID |   Magenc |   Proximity1 |   Proximity2 |   Proximity3 |   Proximity4 |   Force1 |   Force2 |   Force3 |   Force4 |
|------|----------|--------------|--------------|--------------|--------------|----------|----------|----------|----------|
|   19 |     7365 |            0 |            0 |            0 |            0 |     1240 |     1167 |     1083 |     1037 |
|   20 |     3042 |            0 |            0 |            0 |            0 |     1209 |     1106 |     1075 |     1025 |
|   21 |    13800 |            0 |            0 |            0 |            0 |     1230 |     1106 |     1064 |     1003 |
|   22 |     9512 |            0 |            0 |            0 |            0 |     1222 |     1144 |     1123 |     1085 |
|   23 |    14182 |            0 |            0 |            0 |            0 |     1238 |     1179 |     1083 |     1040 |
+------|----------|--------------|--------------|--------------|--------------|----------|----------|----------|----------+

Print Worm Values

Displays real-time worm gear values in a table format.

armh7-tools print-worm
+------------|-------------|---------------|------------------|-----------------+
|   servo_id |   sensor_id |   magenc_init |   magenc_present |   present_angle |
|------------|-------------|---------------|------------------|-----------------|
|          0 |          38 |          6502 |             7368 |      -19.0283   |
|          2 |          40 |          3039 |             3039 |       -0        |
|          6 |          44 |          9502 |             9513 |       -0.241699 |
|          8 |          46 |          9783 |            14170 |      -96.394    |
+------------|-------------|---------------|------------------|-----------------+

rcb4's People

Contributors

iory avatar 708yamaguchi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.