Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .DS_Store
Binary file not shown.
105 changes: 0 additions & 105 deletions CLAUDE.md

This file was deleted.

20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,27 @@ This project is a Vue-based web application designed for configuring EtherCAT mo

* **Module Management**: Add and manage multiple EtherCAT slave modules by Serial Number (SN).
* **Task Assignment**: Assign various hardware tasks to each module, including:
* **Remote Controllers**: DJI RC, SBUS RC.
* **Sensors**: HIPNUC IMU (CAN), SUPER CAP (CAN).
* **Actuators**: DJI Motors, DM Motors, LkTech Motors, DSHOT600, OnBoard PWM.
* **Remote Controllers**: DJI RC, SBUS RC, VT13 RC.
* **Sensors**: HIPNUC IMU (CAN), CAN PMU (CAN), SUPER CAP (CAN), MS5837.
* **Actuators**: DJI Motors, DM Motors, DD Motors, LkTech Motors, DSHOT600, OnBoard PWM, External PWM.
* **Task Configuration**: Modify the configuration items of each task.
* **Import Configuration**: Upload a previously generated `config.yaml` to re-edit it in the editor.
* **Configuration Validation**: Built-in verification script to validate config files for type correctness and structural integrity.
* **ROS2 Integration**: Customize publisher and subscriber topic names for seamless communication with ROS2.
* **Message Schema Visualization**: View the ROS2 message structure directly within the task configuration.
* **Syntax Highlighting**: YAML output with syntax highlighting powered by highlight.js.
* **Automatic YAML Generation**: Generates a complete `config.yaml` file that can be used by the [EcatV2_Master](https://github.com/AIMEtherCAT/EcatV2_Master).

## Project Structure
* `src/pages/`: Contains the main application views (`module_settings.vue` for configuration and `code_generator.vue` for file generation).
* `src/pages/`: Main application views (`ModuleSettings.vue` for configuration and `CodeGenerator.vue` for file generation).
* `src/components/`: Reusable UI components.
* `src/components/message_types/`: Vue templates representing ROS2 message definitions.
* `src/utils/generate-module-def.js`: The core logic that calculates memory offsets (PDO/SDO) and formats the YAML output.
* `src/components/message-types/`: Vue templates representing ROS2 message definitions.
* `src/components/module-settings/`: Module settings page specific components (e.g., `ImportConfigDialog.vue`).
* `src/components/code-generator/`: Code generator page specific components.
* `src/utils/generate-module-def.js`: Core logic that calculates memory offsets (PDO/SDO) and formats the YAML output.
* `src/utils/parse-config.js`: Parses a `config.yaml` back into the editor data structure for re-editing.
* `src/utils/verify-config.js`: Validates configuration files with type checks and structural verification.
* `scripts/verify-config.js`: Standalone script for validating config YAML files.

## Getting Started

Expand Down
128 changes: 128 additions & 0 deletions config_sentry_vt13.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
slaves:
- sn4653115:
sdo_len: !uint16_t 151
task_count: !uint8_t 4
latency_pub_topic: !std::string "/ecat/sn4653115/latency"

tasks:
- app_1:
sdowrite_task_type: !uint8_t 3
conf_connection_lost_read_action: !uint8_t 0x01
pub_topic: !std::string "/ecat/sn4653115/app2/read"
pdoread_offset: !uint16_t 0
sdowrite_can_inst: !uint8_t 2
sdowrite_packet1_id: !uint32_t 0x01
sdowrite_packet2_id: !uint32_t 0x02
sdowrite_packet3_id: !uint32_t 0x03
conf_frame_name: !std::string "imu_link"

- app_2:
sdowrite_task_type: !uint8_t 5
conf_connection_lost_read_action: !uint8_t 0x01
sdowrite_connection_lost_write_action: !uint8_t 0x02
pub_topic: !std::string "/ecat/sn4653115/app3/read"
pdoread_offset: !uint16_t 21
sub_topic: !std::string "/ecat/sn4653115/app3/write"
pdowrite_offset: !uint16_t 0
sdowrite_control_period: !uint16_t 1
sdowrite_can_packet_id: !uint32_t 0x200
sdowrite_motor1_can_id: !uint32_t 0x201
sdowrite_motor2_can_id: !uint32_t 0x202
sdowrite_motor3_can_id: !uint32_t 0x203
sdowrite_motor4_can_id: !uint32_t 0
sdowrite_can_inst: !uint8_t 1
sdowrite_motor1_control_type: !uint8_t 2
sdowrite_motor1_speed_pid_kp: !float 13.5
sdowrite_motor1_speed_pid_ki: !float 1
sdowrite_motor1_speed_pid_kd: !float 0
sdowrite_motor1_speed_pid_max_out: !float 16384
sdowrite_motor1_speed_pid_max_iout: !float 2000
sdowrite_motor2_control_type: !uint8_t 2
sdowrite_motor2_speed_pid_kp: !float 13.5
sdowrite_motor2_speed_pid_ki: !float 1
sdowrite_motor2_speed_pid_kd: !float 0
sdowrite_motor2_speed_pid_max_out: !float 16384
sdowrite_motor2_speed_pid_max_iout: !float 2000
sdowrite_motor3_control_type: !uint8_t 1

- app_3:
sdowrite_task_type: !uint8_t 5
conf_connection_lost_read_action: !uint8_t 0x01
sdowrite_connection_lost_write_action: !uint8_t 0x02
pub_topic: !std::string "/ecat/sn4653115/app4/read"
pdoread_offset: !uint16_t 48
sub_topic: !std::string "/ecat/sn4653115/app4/write"
pdowrite_offset: !uint16_t 9
sdowrite_control_period: !uint16_t 1
sdowrite_can_packet_id: !uint32_t 0x1ff
sdowrite_motor1_can_id: !uint32_t 0
sdowrite_motor2_can_id: !uint32_t 0
sdowrite_motor3_can_id: !uint32_t 0
sdowrite_motor4_can_id: !uint32_t 0x208
sdowrite_can_inst: !uint8_t 1
sdowrite_motor4_control_type: !uint8_t 3
sdowrite_motor4_speed_pid_kp: !float 65
sdowrite_motor4_speed_pid_ki: !float 0.2
sdowrite_motor4_speed_pid_kd: !float 0
sdowrite_motor4_speed_pid_max_out: !float 25000
sdowrite_motor4_speed_pid_max_iout: !float 3000
sdowrite_motor4_angle_pid_kp: !float 1.5
sdowrite_motor4_angle_pid_ki: !float 0
sdowrite_motor4_angle_pid_kd: !float 10.5
sdowrite_motor4_angle_pid_max_out: !float 1800
sdowrite_motor4_angle_pid_max_iout: !float 0

- app_4:
sdowrite_task_type: !uint8_t 14
conf_connection_lost_read_action: !uint8_t 0x02
pub_topic: !std::string "/ecat/sn4653115/vt13/read"
pdoread_offset: !uint16_t 57

- sn4128829:
sdo_len: !uint16_t 11
task_count: !uint8_t 1
latency_pub_topic: !std::string "/ecat/sn4128829/latency"

tasks:
- app_1:
sdowrite_task_type: !uint8_t 2
conf_connection_lost_read_action: !uint8_t 0x01
sdowrite_connection_lost_write_action: !uint8_t 0x02
pub_topic: !std::string "/ecat/sn4128829/app1/read"
pdoread_offset: !uint16_t 0
sub_topic: !std::string "/ecat/sn4128829/app1/write"
pdowrite_offset: !uint16_t 0
sdowrite_control_period: !uint16_t 1
sdowrite_can_packet_id: !uint32_t 0x141
sdowrite_can_inst: !uint8_t 1
sdowrite_control_type: !uint8_t 2

- sn2228292:
sdo_len: !uint16_t 13
task_count: !uint8_t 2
latency_pub_topic: !std::string "/ecat/sn2228292/latency"

tasks:
- app_1:
sdowrite_task_type: !uint8_t 2
conf_connection_lost_read_action: !uint8_t 0x01
sdowrite_connection_lost_write_action: !uint8_t 0x02
pub_topic: !std::string "/ecat/sn2228292/app1/read"
pdoread_offset: !uint16_t 0
sub_topic: !std::string "/ecat/sn2228292/app1/write"
pdowrite_offset: !uint16_t 0
sdowrite_control_period: !uint16_t 1
sdowrite_can_inst: !uint8_t 1
sdowrite_control_type: !uint8_t 8

- app_2:
sdowrite_task_type: !uint8_t 2
conf_connection_lost_read_action: !uint8_t 0x01
sdowrite_connection_lost_write_action: !uint8_t 0x02
pub_topic: !std::string "/ecat/sn2228292/app2/read"
pdoread_offset: !uint16_t 32
sub_topic: !std::string "/ecat/sn2228292/app2/write"
pdowrite_offset: !uint16_t 8
sdowrite_control_period: !uint16_t 1
sdowrite_can_inst: !uint8_t 2
sdowrite_control_type: !uint8_t 8
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "EtherCAT_TaskEditor",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"serve": "vite",
"build": "vite build",
"lint": "eslint --ext .js,.vue src"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.2",
"element-plus": "^2.11.2",
"highlight.js": "^11.11.1",
"vue": "^3.5.22"
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading