rework action executor #9

Closed
opened 2026-05-06 11:25:33 +02:00 by BreizhHardware · 0 comments

Originally created by @Ackimixs on GitHub.

Originally assigned to: @Ackimixs on GitHub.

Describe the bug
there is too much action that are the same but cause i can't pass data too them i can't use only one action with data.

Package

  • modelec-com
  • modelec-core
  • modelec-gui
  • modelec-interfaces
  • modelec-strat
  • modelec-utils

Actual behavior
To much action / step

Expected behavior
On action / step with data

Additional context
Maybe use custom class that refer to the action executor to use the pub / sub of the action executor,
Each custom class ovveride the exec func of a base class and inside of it i call a func from the action executor
Each class has a unique name and to transfer data maybe do something like our pcb protocole :

  • NAME;DATA;DATA;DATA
    in the msg file set all the name and a delimiter so something like :

ActionExec.msg :

string DELIMITER = ";"

# Action
string UP = "UP"

# Step
string UP_STEP = "UP"

in the custom class

class UPAction : public ActionBase {
   string name = modelec_interfaces::msg::ActionExec::UP

  init(string msg) {
    
    auto token = split(msg, modelec_interfaces::msg::ActionExec::DELIMITER);
  }

  exec() {
    
    action_executor->ServoTimed(msg);

  }

}
Originally created by @Ackimixs on GitHub. Originally assigned to: @Ackimixs on GitHub. **Describe the bug** there is too much action that are the same but cause i can't pass data too them i can't use only one action with data. **Package** - [ ] modelec-com - [ ] modelec-core - [ ] modelec-gui - [ ] modelec-interfaces - [x] modelec-strat - [ ] modelec-utils **Actual behavior** To much action / step **Expected behavior** On action / step with data **Additional context** Maybe use custom class that refer to the action executor to use the pub / sub of the action executor, Each custom class ovveride the *exec* func of a base class and inside of it i call a func from the action executor Each class has a unique name and to transfer data maybe do something like our pcb protocole : - NAME;DATA;DATA;DATA in the msg file set all the name and a delimiter so something like : ActionExec.msg : ``` string DELIMITER = ";" # Action string UP = "UP" # Step string UP_STEP = "UP" ``` in the custom class ``` class UPAction : public ActionBase { string name = modelec_interfaces::msg::ActionExec::UP init(string msg) { auto token = split(msg, modelec_interfaces::msg::ActionExec::DELIMITER); } exec() { action_executor->ServoTimed(msg); } } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
modelec/Modelec-ROS2#9
No description provided.