11 changed files with 313 additions and 262 deletions
-
8src/main/java/com/iflytop/gd/app/command/control/MoveToSolutionAreaCommand.java
-
6src/main/java/com/iflytop/gd/app/command/control/TrayUpCommand.java
-
128src/main/java/com/iflytop/gd/app/command/debug/step/DebugCapInHeatAreaCommand.java
-
126src/main/java/com/iflytop/gd/app/command/debug/step/DebugCapOutHeatAreaCommand.java
-
122src/main/java/com/iflytop/gd/app/command/debug/step/DebugMoveTrayToHeatAreaCommand.java
-
124src/main/java/com/iflytop/gd/app/command/debug/step/DebugMoveTrayToSolutionAreaCommand.java
-
8src/main/java/com/iflytop/gd/app/command/debug/step/DebugShowSmogCommand.java
-
8src/main/java/com/iflytop/gd/app/command/selftest/TrayOutCommand.java
-
12src/main/java/com/iflytop/gd/app/service/crafts/CraftsStepService.java
-
24src/main/java/com/iflytop/gd/app/service/device/DeviceCommandTempUtilService.java
-
9src/main/java/com/iflytop/gd/app/service/device/module/GantryModuleService.java
@ -1,64 +1,64 @@ |
|||
package com.iflytop.gd.app.command.debug.step; |
|||
|
|||
import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
import com.iflytop.gd.app.model.bo.Point3D; |
|||
import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
import com.iflytop.gd.app.service.device.module.CapModuleService; |
|||
import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
import com.iflytop.gd.common.annotation.CommandMapping; |
|||
import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.concurrent.CompletableFuture; |
|||
|
|||
/** |
|||
* 指定加热模块安装拍子 |
|||
*/ |
|||
@Slf4j |
|||
@Component |
|||
@RequiredArgsConstructor |
|||
@CommandMapping("debug_cap_in_heat_area") |
|||
public class DebugCapInHeatAreaCommand extends BaseCommandHandler { |
|||
private final GantryModuleService gantryModuleService; |
|||
private final HeatModuleService heatModuleService; |
|||
private final CapModuleService capModuleService; |
|||
private final DevicePositionService devicePositionService; |
|||
|
|||
@Override |
|||
public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
String heatId = cmdDTO.getStringParam("heatId"); |
|||
HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
double clawCapPick = devicePositionService.getPosition(DevicePositionCode.clawCapPick).getDistance(); //获取拍子夹取距离 |
|||
double clawCapGrip = devicePositionService.getPosition(DevicePositionCode.clawCapGrip).getDistance(); //获取拍子夹紧距离 |
|||
double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
double heatModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleCapMoveHeight).getDistance();//加热模块拍子移动高度 |
|||
double capModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.capModuleCapMoveHeight).getDistance();//拍子升降模块拍子z轴移动高度 |
|||
|
|||
Point3D heatAreaCapClawPointPoint3D = heatModuleService.getHeatAreaCapClawPointPoint3D(heatModuleId);//获取指定加热模块拍子上方点位 |
|||
Point3D capStorageCapClawPoint3D = devicePositionService.getPosition(DevicePositionCode.capStorageCapClawPoint).getPoint3D();//获取拍子存放区上方点位; |
|||
|
|||
return runAsync(() -> { |
|||
capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand());//提升拍子存放区至拍子夹取的高度 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方 |
|||
|
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,准备夹取拍子 |
|||
gantryModuleService.gantryZMove(capModuleCapMoveHeight);//下降z轴,使夹爪落入拍子升降模块拍子孔位 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapGrip);//将夹爪收紧,夹住拍子 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaCapClawPointPoint3D);//将携带拍子的机械臂移动至加热模块拍子上方 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升加热模块托盘 |
|||
gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹拍子落入加热模块 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,释放拍子 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand()); //提升拍子存放区 |
|||
}); |
|||
} |
|||
} |
|||
|
|||
//package com.iflytop.gd.app.command.debug.step; |
|||
// |
|||
//import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
//import com.iflytop.gd.app.model.bo.Point3D; |
|||
//import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
//import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
//import com.iflytop.gd.app.service.device.module.CapModuleService; |
|||
//import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
//import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
//import com.iflytop.gd.common.annotation.CommandMapping; |
|||
//import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
//import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
//import lombok.RequiredArgsConstructor; |
|||
//import lombok.extern.slf4j.Slf4j; |
|||
//import org.springframework.stereotype.Component; |
|||
// |
|||
//import java.util.concurrent.CompletableFuture; |
|||
// |
|||
///** |
|||
// * 指定加热模块安装拍子 |
|||
// */ |
|||
//@Slf4j |
|||
//@Component |
|||
//@RequiredArgsConstructor |
|||
//@CommandMapping("debug_cap_in_heat_area") |
|||
//public class DebugCapInHeatAreaCommand extends BaseCommandHandler { |
|||
// private final GantryModuleService gantryModuleService; |
|||
// private final HeatModuleService heatModuleService; |
|||
// private final CapModuleService capModuleService; |
|||
// private final DevicePositionService devicePositionService; |
|||
// |
|||
// @Override |
|||
// public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
// String heatId = cmdDTO.getStringParam("heatId"); |
|||
// HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
// double clawCapPick = devicePositionService.getPosition(DevicePositionCode.clawCapPick).getDistance(); //获取拍子夹取距离 |
|||
// double clawCapGrip = devicePositionService.getPosition(DevicePositionCode.clawCapGrip).getDistance(); //获取拍子夹紧距离 |
|||
// double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
// double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
// double heatModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleCapMoveHeight).getDistance();//加热模块拍子移动高度 |
|||
// double capModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.capModuleCapMoveHeight).getDistance();//拍子升降模块拍子z轴移动高度 |
|||
// |
|||
// Point3D heatAreaCapClawPointPoint3D = heatModuleService.getHeatAreaCapClawPointPoint3D(heatModuleId);//获取指定加热模块拍子上方点位 |
|||
// Point3D capStorageCapClawPoint3D = devicePositionService.getPosition(DevicePositionCode.capStorageCapClawPoint).getPoint3D();//获取拍子存放区上方点位; |
|||
// |
|||
// return runAsync(() -> { |
|||
// capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand());//提升拍子存放区至拍子夹取的高度 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方 |
|||
// |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,准备夹取拍子 |
|||
// gantryModuleService.gantryZMove(capModuleCapMoveHeight);//下降z轴,使夹爪落入拍子升降模块拍子孔位 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapGrip);//将夹爪收紧,夹住拍子 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaCapClawPointPoint3D);//将携带拍子的机械臂移动至加热模块拍子上方 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升加热模块托盘 |
|||
// gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹拍子落入加热模块 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,释放拍子 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
// capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand()); //提升拍子存放区 |
|||
// }); |
|||
// } |
|||
//} |
|||
// |
@ -1,63 +1,63 @@ |
|||
package com.iflytop.gd.app.command.debug.step; |
|||
|
|||
import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
import com.iflytop.gd.app.model.bo.Point3D; |
|||
import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
import com.iflytop.gd.app.service.device.module.CapModuleService; |
|||
import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
import com.iflytop.gd.common.annotation.CommandMapping; |
|||
import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.concurrent.CompletableFuture; |
|||
|
|||
/** |
|||
* 指定加热模块拆卸拍子 |
|||
*/ |
|||
@Slf4j |
|||
@Component |
|||
@RequiredArgsConstructor |
|||
@CommandMapping("debug_cap_out_heat_area") |
|||
public class DebugCapOutHeatAreaCommand extends BaseCommandHandler { |
|||
private final GantryModuleService gantryModuleService; |
|||
private final HeatModuleService heatModuleService; |
|||
private final CapModuleService capModuleService; |
|||
private final DevicePositionService devicePositionService; |
|||
|
|||
@Override |
|||
public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
String heatId = cmdDTO.getStringParam("heatId"); |
|||
HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
double clawCapPick = devicePositionService.getPosition(DevicePositionCode.clawCapPick).getDistance(); //获取拍子夹取距离 |
|||
double clawCapGrip = devicePositionService.getPosition(DevicePositionCode.clawCapGrip).getDistance(); //获取拍子夹紧距离 |
|||
double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
double heatModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleCapMoveHeight).getDistance();//加热模块拍子移动高度 |
|||
double capModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.capModuleCapMoveHeight).getDistance();//拍子升降模块拍子z轴移动高度 |
|||
|
|||
Point3D heatAreaCapClawPointPoint3D = heatModuleService.getHeatAreaCapClawPointPoint3D(heatModuleId);//获取指定加热模块拍子上方点位 |
|||
Point3D capStorageCapClawPoint3D = devicePositionService.getPosition(DevicePositionCode.capStorageCapClawPoint).getPoint3D();//获取拍子存放区上方点位; |
|||
|
|||
return runAsync(() -> { |
|||
capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand()); //提升拍子存放区至拍子夹取的高度 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaCapClawPointPoint3D);//将机械臂移动至加热模块拍子上方 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升指定加热位托盘 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,准备夹取拍子 |
|||
gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹爪落入加热模块拍子孔位 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapGrip);//将夹爪收紧,夹住拍子 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
capModuleService.capMotorMoveByNum(-1);//拍子存放模块下降1个拍子位置 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//将携带拍子的机械臂移动至存放区上方 |
|||
gantryModuleService.gantryZMove(capModuleCapMoveHeight);//下降z轴,使夹拍子落入存放区 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,释放夹取的拍子 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
}); |
|||
} |
|||
} |
|||
|
|||
//package com.iflytop.gd.app.command.debug.step; |
|||
// |
|||
//import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
//import com.iflytop.gd.app.model.bo.Point3D; |
|||
//import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
//import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
//import com.iflytop.gd.app.service.device.module.CapModuleService; |
|||
//import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
//import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
//import com.iflytop.gd.common.annotation.CommandMapping; |
|||
//import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
//import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
//import lombok.RequiredArgsConstructor; |
|||
//import lombok.extern.slf4j.Slf4j; |
|||
//import org.springframework.stereotype.Component; |
|||
// |
|||
//import java.util.concurrent.CompletableFuture; |
|||
// |
|||
///** |
|||
// * 指定加热模块拆卸拍子 |
|||
// */ |
|||
//@Slf4j |
|||
//@Component |
|||
//@RequiredArgsConstructor |
|||
//@CommandMapping("debug_cap_out_heat_area") |
|||
//public class DebugCapOutHeatAreaCommand extends BaseCommandHandler { |
|||
// private final GantryModuleService gantryModuleService; |
|||
// private final HeatModuleService heatModuleService; |
|||
// private final CapModuleService capModuleService; |
|||
// private final DevicePositionService devicePositionService; |
|||
// |
|||
// @Override |
|||
// public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
// String heatId = cmdDTO.getStringParam("heatId"); |
|||
// HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
// double clawCapPick = devicePositionService.getPosition(DevicePositionCode.clawCapPick).getDistance(); //获取拍子夹取距离 |
|||
// double clawCapGrip = devicePositionService.getPosition(DevicePositionCode.clawCapGrip).getDistance(); //获取拍子夹紧距离 |
|||
// double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
// double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
// double heatModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleCapMoveHeight).getDistance();//加热模块拍子移动高度 |
|||
// double capModuleCapMoveHeight = devicePositionService.getPosition(DevicePositionCode.capModuleCapMoveHeight).getDistance();//拍子升降模块拍子z轴移动高度 |
|||
// |
|||
// Point3D heatAreaCapClawPointPoint3D = heatModuleService.getHeatAreaCapClawPointPoint3D(heatModuleId);//获取指定加热模块拍子上方点位 |
|||
// Point3D capStorageCapClawPoint3D = devicePositionService.getPosition(DevicePositionCode.capStorageCapClawPoint).getPoint3D();//获取拍子存放区上方点位; |
|||
// |
|||
// return runAsync(() -> { |
|||
// capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand()); //提升拍子存放区至拍子夹取的高度 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaCapClawPointPoint3D);//将机械臂移动至加热模块拍子上方 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升指定加热位托盘 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,准备夹取拍子 |
|||
// gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹爪落入加热模块拍子孔位 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapGrip);//将夹爪收紧,夹住拍子 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// capModuleService.capMotorMoveByNum(-1);//拍子存放模块下降1个拍子位置 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//将携带拍子的机械臂移动至存放区上方 |
|||
// gantryModuleService.gantryZMove(capModuleCapMoveHeight);//下降z轴,使夹拍子落入存放区 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,释放夹取的拍子 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
// }); |
|||
// } |
|||
//} |
|||
// |
@ -1,61 +1,61 @@ |
|||
package com.iflytop.gd.app.command.debug.step; |
|||
|
|||
import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
import com.iflytop.gd.app.model.bo.Point3D; |
|||
import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
import com.iflytop.gd.common.annotation.CommandMapping; |
|||
import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.concurrent.CompletableFuture; |
|||
|
|||
/** |
|||
* 将托盘从加液模块移至加热模块 |
|||
*/ |
|||
@Slf4j |
|||
@Component |
|||
@RequiredArgsConstructor |
|||
@CommandMapping("debug_move_tray_to_heat_area") |
|||
public class DebugMoveTrayToHeatAreaCommand extends BaseCommandHandler { |
|||
private final GantryModuleService gantryModuleService; |
|||
private final HeatModuleService heatModuleService; |
|||
private final DevicePositionService devicePositionService; |
|||
|
|||
@Override |
|||
public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
String heatId = cmdDTO.getStringParam("heatId"); |
|||
HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
double clawTrayPick = devicePositionService.getPosition(DevicePositionCode.clawTrayPick).getDistance();//获取夹爪托盘夹取距离 |
|||
double clawTrayGrip = devicePositionService.getPosition(DevicePositionCode.clawTrayGrip).getDistance();//获取夹爪托盘夹紧距离 |
|||
double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
double heatModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleTrayMoveHeight).getDistance();//加热模块托盘z轴移动高度 |
|||
double solutionModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.solutionModuleTrayMoveHeight).getDistance();//加液模块托盘z轴移动高度 |
|||
|
|||
Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液模块上方点位 |
|||
Point3D heatAreaTrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(heatModuleId);//获取指定加热模块上方点位 |
|||
Point3D heatArea4TrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(HeatModuleCode.heat_module_04);//获取指定加热模块上方点位 |
|||
|
|||
return runAsync(() -> { |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D); //将机械臂移动至加液模块上方 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,准备夹取托盘 |
|||
gantryModuleService.gantryZMove(solutionModuleTrayMoveHeight);//下降z轴,使夹爪落入托盘孔位 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayGrip);//将夹爪收紧,夹住托盘 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatArea4TrayClawPoint3D);//将携带托盘的机械臂移动至4号加热模块上方 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaTrayClawPoint3D);//将携带托盘的机械臂移动至加热模块上方 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升加热位托盘 |
|||
gantryModuleService.gantryZMove(heatModuleTrayMoveHeight);//下降z轴,使托盘落入加热模块 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,释放托盘 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
}); |
|||
} |
|||
} |
|||
|
|||
//package com.iflytop.gd.app.command.debug.step; |
|||
// |
|||
//import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
//import com.iflytop.gd.app.model.bo.Point3D; |
|||
//import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
//import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
//import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
//import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
//import com.iflytop.gd.common.annotation.CommandMapping; |
|||
//import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
//import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
//import lombok.RequiredArgsConstructor; |
|||
//import lombok.extern.slf4j.Slf4j; |
|||
//import org.springframework.stereotype.Component; |
|||
// |
|||
//import java.util.concurrent.CompletableFuture; |
|||
// |
|||
///** |
|||
// * 将托盘从加液模块移至加热模块 |
|||
// */ |
|||
//@Slf4j |
|||
//@Component |
|||
//@RequiredArgsConstructor |
|||
//@CommandMapping("debug_move_tray_to_heat_area") |
|||
//public class DebugMoveTrayToHeatAreaCommand extends BaseCommandHandler { |
|||
// private final GantryModuleService gantryModuleService; |
|||
// private final HeatModuleService heatModuleService; |
|||
// private final DevicePositionService devicePositionService; |
|||
// |
|||
// @Override |
|||
// public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
// String heatId = cmdDTO.getStringParam("heatId"); |
|||
// HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
// double clawTrayPick = devicePositionService.getPosition(DevicePositionCode.clawTrayPick).getDistance();//获取夹爪托盘夹取距离 |
|||
// double clawTrayGrip = devicePositionService.getPosition(DevicePositionCode.clawTrayGrip).getDistance();//获取夹爪托盘夹紧距离 |
|||
// double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
// double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
// double heatModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleTrayMoveHeight).getDistance();//加热模块托盘z轴移动高度 |
|||
// double solutionModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.solutionModuleTrayMoveHeight).getDistance();//加液模块托盘z轴移动高度 |
|||
// |
|||
// Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液模块上方点位 |
|||
// Point3D heatAreaTrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(heatModuleId);//获取指定加热模块上方点位 |
|||
// Point3D heatArea4TrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(HeatModuleCode.heat_module_04);//获取指定加热模块上方点位 |
|||
// |
|||
// return runAsync(() -> { |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D); //将机械臂移动至加液模块上方 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,准备夹取托盘 |
|||
// gantryModuleService.gantryZMove(solutionModuleTrayMoveHeight);//下降z轴,使夹爪落入托盘孔位 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayGrip);//将夹爪收紧,夹住托盘 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatArea4TrayClawPoint3D);//将携带托盘的机械臂移动至4号加热模块上方 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaTrayClawPoint3D);//将携带托盘的机械臂移动至加热模块上方 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升加热位托盘 |
|||
// gantryModuleService.gantryZMove(heatModuleTrayMoveHeight);//下降z轴,使托盘落入加热模块 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,释放托盘 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
// }); |
|||
// } |
|||
//} |
|||
// |
@ -1,62 +1,62 @@ |
|||
package com.iflytop.gd.app.command.debug.step; |
|||
|
|||
import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
import com.iflytop.gd.app.model.bo.Point3D; |
|||
import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
import com.iflytop.gd.common.annotation.CommandMapping; |
|||
import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.concurrent.CompletableFuture; |
|||
|
|||
/** |
|||
* 将托盘从加热模块移至加液模块 |
|||
*/ |
|||
@Slf4j |
|||
@Component |
|||
@RequiredArgsConstructor |
|||
@CommandMapping("debug_move_tray_to_solution_area") |
|||
public class DebugMoveTrayToSolutionAreaCommand extends BaseCommandHandler { |
|||
private final GantryModuleService gantryModuleService; |
|||
private final HeatModuleService heatModuleService; |
|||
private final DevicePositionService devicePositionService; |
|||
|
|||
@Override |
|||
public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
String heatId = cmdDTO.getStringParam("heatId"); |
|||
HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
double clawTrayPick = devicePositionService.getPosition(DevicePositionCode.clawTrayPick).getDistance();//获取夹爪托盘夹取距离 |
|||
double clawTrayGrip = devicePositionService.getPosition(DevicePositionCode.clawTrayGrip).getDistance();//获取夹爪托盘夹紧距离 |
|||
double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
double heatModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleTrayMoveHeight).getDistance();//加热模块托盘z轴移动高度 |
|||
double solutionModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.solutionModuleTrayMoveHeight).getDistance();//加液模块托盘z轴移动高度 |
|||
|
|||
Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液模块上方点位 |
|||
Point3D heatAreaTrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(heatModuleId);//获取指定加热模块上方点位 |
|||
Point3D heatArea4TrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(HeatModuleCode.heat_module_04);//获取指定加热模块上方点位 |
|||
|
|||
return runAsync(() -> { |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaTrayClawPoint3D);//将机械臂移动至加热模块上方 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升指定加热位托盘 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,准备夹取托盘 |
|||
gantryModuleService.gantryZMove(heatModuleTrayMoveHeight);//下降z轴,使夹爪落入托盘孔位 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayGrip);//将夹爪收紧,夹住托盘 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatArea4TrayClawPoint3D);//将携带托盘的机械臂移动至4号加热模块上方 |
|||
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D); //将携带托盘的机械臂移动至加液模块上方 |
|||
gantryModuleService.gantryZMove(solutionModuleTrayMoveHeight);//下降z轴,使托盘落入加液模块 |
|||
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,释放托盘 |
|||
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
|
|||
}); |
|||
} |
|||
} |
|||
|
|||
//package com.iflytop.gd.app.command.debug.step; |
|||
// |
|||
//import com.iflytop.gd.app.core.BaseCommandHandler; |
|||
//import com.iflytop.gd.app.model.bo.Point3D; |
|||
//import com.iflytop.gd.app.model.dto.CmdDTO; |
|||
//import com.iflytop.gd.app.service.api.DevicePositionService; |
|||
//import com.iflytop.gd.app.service.device.module.GantryModuleService; |
|||
//import com.iflytop.gd.app.service.device.module.HeatModuleService; |
|||
//import com.iflytop.gd.common.annotation.CommandMapping; |
|||
//import com.iflytop.gd.common.enums.HeatModuleCode; |
|||
//import com.iflytop.gd.common.enums.data.DevicePositionCode; |
|||
//import lombok.RequiredArgsConstructor; |
|||
//import lombok.extern.slf4j.Slf4j; |
|||
//import org.springframework.stereotype.Component; |
|||
// |
|||
//import java.util.concurrent.CompletableFuture; |
|||
// |
|||
///** |
|||
// * 将托盘从加热模块移至加液模块 |
|||
// */ |
|||
//@Slf4j |
|||
//@Component |
|||
//@RequiredArgsConstructor |
|||
//@CommandMapping("debug_move_tray_to_solution_area") |
|||
//public class DebugMoveTrayToSolutionAreaCommand extends BaseCommandHandler { |
|||
// private final GantryModuleService gantryModuleService; |
|||
// private final HeatModuleService heatModuleService; |
|||
// private final DevicePositionService devicePositionService; |
|||
// |
|||
// @Override |
|||
// public CompletableFuture<Void> handle(CmdDTO cmdDTO) throws Exception { |
|||
// String heatId = cmdDTO.getStringParam("heatId"); |
|||
// HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId); |
|||
// double clawTrayPick = devicePositionService.getPosition(DevicePositionCode.clawTrayPick).getDistance();//获取夹爪托盘夹取距离 |
|||
// double clawTrayGrip = devicePositionService.getPosition(DevicePositionCode.clawTrayGrip).getDistance();//获取夹爪托盘夹紧距离 |
|||
// double trayLift = devicePositionService.getPosition(DevicePositionCode.trayLift).getDistance(); //托盘升降抬升距离 |
|||
// double trayLower = devicePositionService.getPosition(DevicePositionCode.trayLower).getDistance(); //获取加热位下降托盘位置 |
|||
// double heatModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.heatModuleTrayMoveHeight).getDistance();//加热模块托盘z轴移动高度 |
|||
// double solutionModuleTrayMoveHeight = devicePositionService.getPosition(DevicePositionCode.solutionModuleTrayMoveHeight).getDistance();//加液模块托盘z轴移动高度 |
|||
// |
|||
// Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液模块上方点位 |
|||
// Point3D heatAreaTrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(heatModuleId);//获取指定加热模块上方点位 |
|||
// Point3D heatArea4TrayClawPoint3D = heatModuleService.getHeatAreaTrayClawPoint3D(HeatModuleCode.heat_module_04);//获取指定加热模块上方点位 |
|||
// |
|||
// return runAsync(() -> { |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaTrayClawPoint3D);//将机械臂移动至加热模块上方 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升指定加热位托盘 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,准备夹取托盘 |
|||
// gantryModuleService.gantryZMove(heatModuleTrayMoveHeight);//下降z轴,使夹爪落入托盘孔位 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayGrip);//将夹爪收紧,夹住托盘 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatArea4TrayClawPoint3D);//将携带托盘的机械臂移动至4号加热模块上方 |
|||
// gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D); //将携带托盘的机械臂移动至加液模块上方 |
|||
// gantryModuleService.gantryZMove(solutionModuleTrayMoveHeight);//下降z轴,使托盘落入加液模块 |
|||
// gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,释放托盘 |
|||
// gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|||
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热模块托盘 |
|||
// |
|||
// }); |
|||
// } |
|||
//} |
|||
// |
Write
Preview
Loading…
Cancel
Save
Reference in new issue