Skip to content
Snippets Groups Projects
Commit afea43e5 authored by René Schöne's avatar René Schöne
Browse files

Begin with DSL for the example

parent b9ddda3f
No related branches found
No related tags found
No related merge requests found
Pipeline #6376 passed
/**
* Version 2020-04-17
*/
// --- update definitions ---
read Joint.CurrentPosition using LinkStateToIntPosition ;
write RobotArm._AppropriateSpeed using CreateSpeedMessage ;
// --- dependency definitions ---
RobotArm._AppropriateSpeed canDependOn Joint.CurrentPosition as dependency1 ;
// --- mapping definitions ---
LinkStateToIntPosition: map protobuf panda.Linkstate.PandaLinkState x to IntPosition y {
panda.Linkstate.PandaLinkState.Position p = x.getPos();
y = IntPosition.of((int) p.getPositionX(), (int) p.getPositionY(), (int) p.getPositionZ());
}
CreateSpeedMessage: map double x to protobuf config.Robotconfig.RobotConfig y {
y = config.Robotconfig.RobotConfig.newBuilder()
.setSpeed(x)
.build();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment