取货高度
This commit is contained in:
parent
5507e49ff7
commit
81423a8ad3
@ -137,6 +137,7 @@ public class PathApiImpl implements PathApi {
|
||||
@Override
|
||||
public void graphMatchData(String message) {
|
||||
TenantContextHolder.setTenantId(1L);
|
||||
log.info("匹配路网的消息 :{}",message);
|
||||
pathPlanningService.graphMatchData(message);
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class RobotReactiveStatusApiImpl implements RobotReactiveStatusApi {
|
||||
@Override
|
||||
public void robotReactiveStatus(String message) {
|
||||
TenantContextHolder.setTenantId(1L);
|
||||
log.info("切换地图 :{}",message);
|
||||
log.info("车辆所在楼层和异常信息 :{}",message);
|
||||
RobotReactiveStatusDTO data = JSON.parseObject(message, RobotReactiveStatusDTO.class);
|
||||
String floorAreaKey = RobotTaskChcheConstant.ROBOT_FLOOR_AREA + data.getMac();
|
||||
String robotNo = robotInformationService.getRobotNoByMac(data.getMac());
|
||||
|
@ -144,7 +144,7 @@ public class RobotTaskServiceImpl extends ServiceImpl<RobotTaskMapper, RobotTask
|
||||
@Value("${zn.robot_config.offset_height}")
|
||||
private Double offsetHeight;
|
||||
|
||||
@Value("${zn.robot_config.default_tray_height:1.0}")
|
||||
@Value("${zn.robot_config.default_tray_height:0.82}")
|
||||
private Double defaultTrayHeight;
|
||||
|
||||
@Resource
|
||||
|
@ -152,7 +152,7 @@ public class AutoChargeServiceImpl implements AutoChargeService {
|
||||
robotTaskDetailMapper.insertBatch(bean);
|
||||
}
|
||||
|
||||
chargeLogMapper.insertBatch(logs);
|
||||
chargeLogMapper.insert(logs);
|
||||
|
||||
robotPathPlanningService.sendChargeTaskToPP(logs, taskDetailDOS, robots);
|
||||
|
||||
|
@ -96,6 +96,9 @@ public class RobotPathPlanningServiceImpl implements RobotPathPlanningService {
|
||||
@Value("${zn.move-no:MOVE}")
|
||||
private String moveTaskNo;
|
||||
|
||||
@Value("${zn.robot_config.default_tray_height:0.82}")
|
||||
private Double defaultTrayHeight;
|
||||
|
||||
@Autowired
|
||||
private RobotTaskMapper robotTaskMapper;
|
||||
|
||||
@ -297,9 +300,6 @@ public class RobotPathPlanningServiceImpl implements RobotPathPlanningService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void sendChargeTaskToPP(List<RobotChargeLogDO> logs, List<RobotTaskDetailDO> taskDetailDOS,
|
||||
List<RobotInformationDO> robots) {
|
||||
@ -454,9 +454,8 @@ public class RobotPathPlanningServiceImpl implements RobotPathPlanningService {
|
||||
if (ObjectUtil.isNotEmpty(taskDetailDO.getFromLocationId())) {
|
||||
pathPlanning.setTakeLocationNumber(Math.abs(locationNumberReduce - taskDetailDO.getFromLocationNumber()));
|
||||
pathPlanning.setTakePointId(fromLocation.getMapItemId());
|
||||
if (ObjectUtil.isNotEmpty(fromLocation.getLocationTotalHeight())) {
|
||||
pathPlanning.setTakeHeight(Double.valueOf(fromLocation.getLocationTotalHeight() + ""));
|
||||
}
|
||||
|
||||
pathPlanningSetTakeHeight(pathPlanning, fromLocation);
|
||||
pathPlanning.setTakeLevel(fromLocation.getLocationStorey());
|
||||
pathPlanning.setTakeOffsetHeight(offsetHeight);
|
||||
if (ObjectUtil.isNotEmpty(taskDetailDO.getFromLaneId())) {
|
||||
@ -469,11 +468,8 @@ public class RobotPathPlanningServiceImpl implements RobotPathPlanningService {
|
||||
if (ObjectUtil.isNotEmpty(taskDetailDO.getToLocationId())) {
|
||||
pathPlanning.setReleaseLocationNumber(taskDetailDO.getToLocationNumber());
|
||||
pathPlanning.setReleasePointId(toLocation.getMapItemId());
|
||||
if (ObjectUtil.isNotEmpty(toLocation.getLocationStorey()) && ZeroOneEnum.ONE.getType().equals(toLocation.getLocationStorey())) {
|
||||
pathPlanning.setReleaseHeight(0.0);
|
||||
}else if (ObjectUtil.isNotEmpty(toLocation.getLocationTrayHeight())) {
|
||||
pathPlanning.setReleaseHeight(Double.valueOf(toLocation.getLocationTrayHeight() + ""));
|
||||
}
|
||||
|
||||
pathPlanningSetReleaseHeight(pathPlanning,toLocation);
|
||||
pathPlanning.setReleaseLevel(toLocation.getLocationStorey());
|
||||
pathPlanning.setReleaseOffsetHeight(offsetHeight);
|
||||
if (ObjectUtil.isNotEmpty(taskDetailDO.getToLaneId())) {
|
||||
@ -495,8 +491,52 @@ public class RobotPathPlanningServiceImpl implements RobotPathPlanningService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置放货高度
|
||||
* @param pathPlanning
|
||||
* @param toLocation
|
||||
*/
|
||||
private void pathPlanningSetReleaseHeight(TaskToPathPlanningDTO pathPlanning, WareHouseLocationDO toLocation) {
|
||||
if ( ZeroOneEnum.ONE.getType().equals(toLocation.getLocationStorey())) {
|
||||
pathPlanning.setReleaseHeight(0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
WareHouseLocationDO nextLocation = locationMapper.selectOne(new LambdaQueryWrapperX<WareHouseLocationDO>()
|
||||
.eq(WareHouseLocationDO::getId, toLocation.getMapItemId())
|
||||
.eq(WareHouseLocationDO::getLocationStorey, toLocation.getLocationStorey()-1)
|
||||
.last("limit 1"));
|
||||
if (ObjectUtil.isNotEmpty(nextLocation) && ObjectUtil.isNotEmpty(nextLocation.getLocationTotalHeight())) {
|
||||
pathPlanning.setReleaseHeight(Double.valueOf(nextLocation.getLocationTotalHeight() + ""));
|
||||
return;
|
||||
}
|
||||
|
||||
Integer locationStorey = toLocation.getLocationStorey() - 1;
|
||||
double height = locationStorey * defaultTrayHeight;
|
||||
log.info("放货设置默认高度 :{}",pathPlanning.getReleaseHeight());
|
||||
pathPlanning.setReleaseHeight(height);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置取货高度
|
||||
*
|
||||
* @param pathPlanning
|
||||
* @param fromLocation
|
||||
*/
|
||||
private void pathPlanningSetTakeHeight(TaskToPathPlanningDTO pathPlanning, WareHouseLocationDO fromLocation) {
|
||||
if (ObjectUtil.isNotEmpty(fromLocation.getLocationTotalHeight())) {
|
||||
pathPlanning.setTakeHeight(Double.valueOf(fromLocation.getLocationTotalHeight() + ""));
|
||||
return;
|
||||
}
|
||||
Integer locationStorey = fromLocation.getLocationStorey();
|
||||
double height = locationStorey * defaultTrayHeight;
|
||||
log.info("取货设置默认取货高度 :{}",height);
|
||||
pathPlanning.setTakeHeight(height);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动到路径点
|
||||
*
|
||||
* @param pathPlanning
|
||||
* @param taskDetailDO
|
||||
*/
|
||||
|
@ -226,7 +226,7 @@ zn:
|
||||
camera_secret_key: A2C4rv7DY012c9ef #摄像头秘钥
|
||||
do_cycle: true #是否开启循环
|
||||
lane_auto_move: true #线库是否自动移库 true:线库执行自动移库 、false:线库关闭执行自动移库
|
||||
robot_position_cache_time: 10 #机器人上报点位存储时间(秒)
|
||||
robot_position_cache_time: 10000000 #机器人上报点位存储时间(秒)
|
||||
cycle_do_auto_move: true #存在循环的任务,是否开启自动移库. true:存在循环任务,开启自动移库; false:有循环任务不自动移库
|
||||
full_electricity: 100 #机器人充满电的电量
|
||||
task_need_single: true #机器人对同一线库/点位是不是只能有一台机器人做任务 (true:一个点位/线库,只有一台机器人)
|
||||
@ -240,7 +240,7 @@ zn:
|
||||
check_sku_info: true #校验物料信息
|
||||
robot_config: #机器人取放货默认配置
|
||||
offset_height: 0.1 #叉起货需要在原来高度基础上偏移的高度
|
||||
default_tray_height: 1.1 #默认每层高度
|
||||
default_tray_height: 0.82 #默认每层高度
|
||||
open_rate_limiter: true #是否开启限流
|
||||
path_planning:
|
||||
task_chche_time: 1209600 #任务缓存的时间, 默认一星期
|
||||
|
Loading…
Reference in New Issue
Block a user