rm launch_local.moos
This commit is contained in:
0
src/CMakeLists.txt
Normal file → Executable file
0
src/CMakeLists.txt
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm.cpp
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm.cpp
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm.h
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm.h
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm_Info.cpp
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm_Info.cpp
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm_Info.h
Normal file → Executable file
0
src/pBoardSupportComm/BoardSupportComm_Info.h
Normal file → Executable file
0
src/pBoardSupportComm/CMakeLists.txt
Normal file → Executable file
0
src/pBoardSupportComm/CMakeLists.txt
Normal file → Executable file
0
src/pBoardSupportComm/main.cpp
Normal file → Executable file
0
src/pBoardSupportComm/main.cpp
Normal file → Executable file
0
src/pBoardSupportComm/pBoardSupportComm.moos
Normal file → Executable file
0
src/pBoardSupportComm/pBoardSupportComm.moos
Normal file → Executable file
0
src/pClientViewer/Behavior.pb.h
Normal file → Executable file
0
src/pClientViewer/Behavior.pb.h
Normal file → Executable file
0
src/pClientViewer/CMakeLists.txt
Normal file → Executable file
0
src/pClientViewer/CMakeLists.txt
Normal file → Executable file
0
src/pClientViewer/ClientViewer.cpp
Normal file → Executable file
0
src/pClientViewer/ClientViewer.cpp
Normal file → Executable file
0
src/pClientViewer/ClientViewer.h
Normal file → Executable file
0
src/pClientViewer/ClientViewer.h
Normal file → Executable file
0
src/pClientViewer/ClientViewer_Info.cpp
Normal file → Executable file
0
src/pClientViewer/ClientViewer_Info.cpp
Normal file → Executable file
0
src/pClientViewer/ClientViewer_Info.h
Normal file → Executable file
0
src/pClientViewer/ClientViewer_Info.h
Normal file → Executable file
0
src/pClientViewer/main.cpp
Normal file → Executable file
0
src/pClientViewer/main.cpp
Normal file → Executable file
0
src/pClientViewer/pClientViewer.moos
Normal file → Executable file
0
src/pClientViewer/pClientViewer.moos
Normal file → Executable file
0
src/pDataManagement/CMakeLists.txt
Normal file → Executable file
0
src/pDataManagement/CMakeLists.txt
Normal file → Executable file
0
src/pDataManagement/DataManagement.cpp
Normal file → Executable file
0
src/pDataManagement/DataManagement.cpp
Normal file → Executable file
0
src/pDataManagement/DataManagement.h
Normal file → Executable file
0
src/pDataManagement/DataManagement.h
Normal file → Executable file
0
src/pDataManagement/DataManagement_Info.cpp
Normal file → Executable file
0
src/pDataManagement/DataManagement_Info.cpp
Normal file → Executable file
0
src/pDataManagement/DataManagement_Info.h
Normal file → Executable file
0
src/pDataManagement/DataManagement_Info.h
Normal file → Executable file
0
src/pDataManagement/main.cpp
Normal file → Executable file
0
src/pDataManagement/main.cpp
Normal file → Executable file
0
src/pDataManagement/pDataManagement.moos
Normal file → Executable file
0
src/pDataManagement/pDataManagement.moos
Normal file → Executable file
0
src/pEmulator/.LastOpenedMOOSLogDirectory
Normal file → Executable file
0
src/pEmulator/.LastOpenedMOOSLogDirectory
Normal file → Executable file
0
src/pEmulator/CMakeLists.txt
Normal file → Executable file
0
src/pEmulator/CMakeLists.txt
Normal file → Executable file
6
src/pEmulator/Emulator.cpp
Normal file → Executable file
6
src/pEmulator/Emulator.cpp
Normal file → Executable file
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zjk 1553836110@qq.com
|
||||
* @Date: 2023-10-12 09:52:27
|
||||
* @LastEditors: zjk 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-21 15:28:32
|
||||
* @LastEditors: zhaojingkui 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-28 11:32:48
|
||||
* @FilePath: /moos-ivp-pi/src/pEmulator/Emulator.cpp
|
||||
* @Description:
|
||||
*
|
||||
@@ -207,6 +207,7 @@ bool Emulator::_150Connect()
|
||||
_150ServerThread.Start();
|
||||
_150ConnectThread.RequestQuit();
|
||||
isConnect = "Connected and start server";
|
||||
return true;
|
||||
}
|
||||
void Emulator::registerVariables()
|
||||
{
|
||||
@@ -377,6 +378,7 @@ bool Emulator::receiveUdpDate()
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Emulator::set150Info()
|
||||
|
||||
6
src/pEmulator/Emulator.hpp
Normal file → Executable file
6
src/pEmulator/Emulator.hpp
Normal file → Executable file
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zjk 1553836110@qq.com
|
||||
* @Date: 2023-10-12 15:57:27
|
||||
* @LastEditors: zjk 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-10 08:34:14
|
||||
* @LastEditors: zhaojingkui 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-28 11:32:15
|
||||
* @FilePath: /moos-ivp-pi/src/pEmulator/Emulator.hpp
|
||||
* @Description:
|
||||
*
|
||||
@@ -45,7 +45,7 @@ typedef struct uuv
|
||||
double lon;
|
||||
double lat;
|
||||
double alt;
|
||||
};
|
||||
}uuv;
|
||||
|
||||
class Emulator : public AppCastingMOOSApp
|
||||
{
|
||||
|
||||
4
src/pEmulator/_150server.cpp
Normal file → Executable file
4
src/pEmulator/_150server.cpp
Normal file → Executable file
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zjk 1553836110@qq.com
|
||||
* @Date: 2023-11-07 14:59:47
|
||||
* @LastEditors: zjk 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-08 09:19:46
|
||||
* @LastEditors: zhaojingkui 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-28 18:20:41
|
||||
* @FilePath: /moos-ivp-pi/src/pEmulator/_150server.cpp
|
||||
* @Description:
|
||||
*
|
||||
|
||||
4
src/pEmulator/_150server.hpp
Normal file → Executable file
4
src/pEmulator/_150server.hpp
Normal file → Executable file
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zjk 1553836110@qq.com
|
||||
* @Date: 2023-11-07 14:59:36
|
||||
* @LastEditors: zjk 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-07 17:12:30
|
||||
* @LastEditors: zhaojingkui 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-28 18:19:10
|
||||
* @FilePath: /moos-ivp-pi/src/pEmulator/_150server.hpp
|
||||
* @Description:
|
||||
*
|
||||
|
||||
0
src/pEmulator/a.moos
Normal file → Executable file
0
src/pEmulator/a.moos
Normal file → Executable file
0
src/pEmulator/alpha.bhv
Normal file → Executable file
0
src/pEmulator/alpha.bhv
Normal file → Executable file
0
src/pEmulator/main.cpp
Normal file → Executable file
0
src/pEmulator/main.cpp
Normal file → Executable file
0
src/pEmulator/pEmulator.moos
Normal file → Executable file
0
src/pEmulator/pEmulator.moos
Normal file → Executable file
0
src/pFaultHandle/CMakeLists.txt
Normal file → Executable file
0
src/pFaultHandle/CMakeLists.txt
Normal file → Executable file
0
src/pFaultHandle/FaultHandle.cpp
Normal file → Executable file
0
src/pFaultHandle/FaultHandle.cpp
Normal file → Executable file
0
src/pFaultHandle/FaultHandle.h
Normal file → Executable file
0
src/pFaultHandle/FaultHandle.h
Normal file → Executable file
0
src/pFaultHandle/FaultHandle_Info.cpp
Normal file → Executable file
0
src/pFaultHandle/FaultHandle_Info.cpp
Normal file → Executable file
0
src/pFaultHandle/FaultHandle_Info.h
Normal file → Executable file
0
src/pFaultHandle/FaultHandle_Info.h
Normal file → Executable file
0
src/pFaultHandle/main.cpp
Normal file → Executable file
0
src/pFaultHandle/main.cpp
Normal file → Executable file
0
src/pFaultHandle/pFaultHandle.moos
Normal file → Executable file
0
src/pFaultHandle/pFaultHandle.moos
Normal file → Executable file
0
src/pMotionControler/CMakeLists.txt
Normal file → Executable file
0
src/pMotionControler/CMakeLists.txt
Normal file → Executable file
0
src/pMotionControler/ControlParam.json
Normal file → Executable file
0
src/pMotionControler/ControlParam.json
Normal file → Executable file
0
src/pMotionControler/Controler.cpp
Normal file → Executable file
0
src/pMotionControler/Controler.cpp
Normal file → Executable file
0
src/pMotionControler/Controler.hpp
Normal file → Executable file
0
src/pMotionControler/Controler.hpp
Normal file → Executable file
0
src/pMotionControler/MotionControler.cpp
Normal file → Executable file
0
src/pMotionControler/MotionControler.cpp
Normal file → Executable file
0
src/pMotionControler/MotionControler.hpp
Normal file → Executable file
0
src/pMotionControler/MotionControler.hpp
Normal file → Executable file
0
src/pMotionControler/a.moos
Normal file → Executable file
0
src/pMotionControler/a.moos
Normal file → Executable file
0
src/pMotionControler/alpha.bhv
Normal file → Executable file
0
src/pMotionControler/alpha.bhv
Normal file → Executable file
0
src/pMotionControler/alpha.moos
Normal file → Executable file
0
src/pMotionControler/alpha.moos
Normal file → Executable file
0
src/pMotionControler/main.cpp
Normal file → Executable file
0
src/pMotionControler/main.cpp
Normal file → Executable file
0
src/pMotionControler/pidControl.cpp
Normal file → Executable file
0
src/pMotionControler/pidControl.cpp
Normal file → Executable file
0
src/pMotionControler/pidControl.hpp
Normal file → Executable file
0
src/pMotionControler/pidControl.hpp
Normal file → Executable file
0
src/pMotionControler/simMat.moos
Normal file → Executable file
0
src/pMotionControler/simMat.moos
Normal file → Executable file
6
src/pStateManagement/CMakeLists.txt
Normal file → Executable file
6
src/pStateManagement/CMakeLists.txt
Normal file → Executable file
@@ -17,6 +17,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
#find_package (jsoncpp NO_MODULE REQUIRED)
|
||||
|
||||
find_package (GeographicLib REQUIRED)
|
||||
include_directories(${GeographicLib_INCLUDE_DIRS})
|
||||
|
||||
include_directories(/usr/include/jsoncpp/)
|
||||
link_directories(/usr/local/lib/)
|
||||
|
||||
@@ -26,7 +29,8 @@ TARGET_LINK_LIBRARIES(pStateManagement
|
||||
${MOOS_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
${SYSTEM_LIBS}
|
||||
${DUNE_LIB}
|
||||
${DUNE_LIB}
|
||||
${GeographicLib_LIBRARIES}
|
||||
mbutil
|
||||
m
|
||||
pthread
|
||||
|
||||
2
src/pStateManagement/StateManagement.cpp
Normal file → Executable file
2
src/pStateManagement/StateManagement.cpp
Normal file → Executable file
@@ -9,6 +9,7 @@
|
||||
#include "MBUtils.h"
|
||||
#include "StateManagement.h"
|
||||
#include <json/json.h>
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -48,6 +49,7 @@ bool StateManagement::OnNewMail(MOOSMSG_LIST &NewMail)
|
||||
Json::Value deviceState;
|
||||
std::string manualState;
|
||||
int missionState;
|
||||
int missionState;
|
||||
|
||||
if(key == "uManual_enable_cmd")
|
||||
{
|
||||
|
||||
6
src/pStateManagement/StateManagement.h
Normal file → Executable file
6
src/pStateManagement/StateManagement.h
Normal file → Executable file
@@ -9,6 +9,12 @@
|
||||
#define StateManagement_HEADER
|
||||
|
||||
#include "MOOS/libMOOS/MOOSLib.h"
|
||||
#include "MOOS/libMOOS/Thirdparty/AppCasting/AppCastingMOOSApp.h"
|
||||
#include <DUNE/DUNE.hpp>
|
||||
#include <GeographicLib/LocalCartesian.hpp>
|
||||
#include <json/json.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
class StateManagement : public CMOOSApp
|
||||
{
|
||||
|
||||
0
src/pStateManagement/StateManagement_Info.cpp
Normal file → Executable file
0
src/pStateManagement/StateManagement_Info.cpp
Normal file → Executable file
0
src/pStateManagement/StateManagement_Info.h
Normal file → Executable file
0
src/pStateManagement/StateManagement_Info.h
Normal file → Executable file
0
src/pStateManagement/main.cpp
Normal file → Executable file
0
src/pStateManagement/main.cpp
Normal file → Executable file
0
src/pStateManagement/pStateManagement.moos
Normal file → Executable file
0
src/pStateManagement/pStateManagement.moos
Normal file → Executable file
0
src/pSurfaceSupportComm/CMakeLists.txt
Normal file → Executable file
0
src/pSurfaceSupportComm/CMakeLists.txt
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicTCPEvent.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicTCPEvent.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicTCPEvent.h
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicTCPEvent.h
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicUDPEvent.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicUDPEvent.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicUDPEvent.h
Normal file → Executable file
0
src/pSurfaceSupportComm/PeriodicUDPEvent.h
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm.h
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm.h
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm_Info.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm_Info.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm_Info.h
Normal file → Executable file
0
src/pSurfaceSupportComm/SurfaceSupportComm_Info.h
Normal file → Executable file
0
src/pSurfaceSupportComm/main.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/main.cpp
Normal file → Executable file
0
src/pSurfaceSupportComm/pSurfaceSupportComm.moos
Normal file → Executable file
0
src/pSurfaceSupportComm/pSurfaceSupportComm.moos
Normal file → Executable file
0
src/pTaskManagement/CMakeLists.txt
Normal file → Executable file
0
src/pTaskManagement/CMakeLists.txt
Normal file → Executable file
186
src/pTaskManagement/TaskManger.cpp
Normal file → Executable file
186
src/pTaskManagement/TaskManger.cpp
Normal file → Executable file
@@ -13,7 +13,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define DEBUG
|
||||
// #define DEBUG
|
||||
|
||||
|
||||
//---------------------------------------------------------
|
||||
@@ -45,7 +45,7 @@ bool TaskManger::OnNewMail(MOOSMSG_LIST &NewMail)
|
||||
{
|
||||
CMOOSMsg &msg = *p;
|
||||
string msg_name = msg.GetName();
|
||||
string msg_str = msg.GetString();
|
||||
string msg_str = msg.GetString();
|
||||
double msg_dval = msg.GetDouble();
|
||||
bool msg_bval = msg.GetBinaryData();
|
||||
// cout << msg_name + ": " << msg_str << endl;
|
||||
@@ -93,7 +93,12 @@ bool TaskManger::OnNewMail(MOOSMSG_LIST &NewMail)
|
||||
st = 39;
|
||||
state = FAULT;
|
||||
}
|
||||
|
||||
if(msg_name == MGS_SENDWAYPARAM && msg_str == "true")
|
||||
{
|
||||
state = CONFIG;
|
||||
st = 41;
|
||||
}
|
||||
// 控制消息
|
||||
if(msg_name == MSG_IN_SSM)
|
||||
{
|
||||
Json::Value j;
|
||||
@@ -134,14 +139,14 @@ bool TaskManger::OnNewMail(MOOSMSG_LIST &NewMail)
|
||||
Json::Value j;
|
||||
Json::Reader a;
|
||||
a.parse(msg_str,j);
|
||||
int fault_level = j["FaultLevel"].asInt();
|
||||
if(fault_level != 0)
|
||||
// int fault_level = j["FaultLevel"].asInt();
|
||||
if(!j["FaultLevel"].empty()) //TODO: 修改故障码支持
|
||||
{
|
||||
state = FAULT;
|
||||
faultNumber = 1111;
|
||||
if(!j["FaultMsgs"].isMember("uMission_status_fault"))
|
||||
faultNumber = 1111;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
@@ -346,16 +351,30 @@ bool TaskManger::Iterate()
|
||||
{
|
||||
case 40: //配置安全规则
|
||||
{
|
||||
readSafetyRules("a");
|
||||
readTask = readSafetyRules();
|
||||
if( readTask != 0 )
|
||||
{
|
||||
state = FAULT;
|
||||
faultNumber = 14 + readTask;
|
||||
st = 30;
|
||||
faultMsg = "safetyFileError : " + intToString(readTask);
|
||||
}
|
||||
//发送安全规则设置
|
||||
setSafetyRules(maxTime, maxDepth, minAltitude, safePolygon);
|
||||
// setMaxDepth(maxDepth);
|
||||
setMaxDepth("2");
|
||||
setMaxDepth(maxDepth);
|
||||
st = 49;
|
||||
break;
|
||||
}
|
||||
case 41: //路径参数配置
|
||||
{
|
||||
readWayConfig("a");
|
||||
readTask = readWayConfig();
|
||||
if( readTask != 0 )
|
||||
{
|
||||
state = FAULT;
|
||||
faultNumber = 14 + readTask;
|
||||
st = 30;
|
||||
faultMsg = "safetyFileError : " + intToString(readTask);
|
||||
}
|
||||
setWayConfig(lead,lead_damper,capture_line,capture_radius,slip_radius);
|
||||
st = 49;
|
||||
//setWayConfig();
|
||||
@@ -379,6 +398,8 @@ bool TaskManger::Iterate()
|
||||
switch (st)
|
||||
{
|
||||
case 50: // 清除变量
|
||||
FaultFlagClear();
|
||||
faultNumber = 0;
|
||||
current_node_complete = false;
|
||||
current_pol_complete = false;
|
||||
current_node="";
|
||||
@@ -429,13 +450,32 @@ bool TaskManger::OnStartUp()
|
||||
if(param == "PLANCONFIGPATH")
|
||||
{
|
||||
planConfigPath = value;
|
||||
RepList["CueenPath"] = planConfigPath;
|
||||
}
|
||||
//RepList["CueenPath"] = planConfigPath;
|
||||
}
|
||||
if(param == "SAFETYRULESPATH")
|
||||
{
|
||||
safetyRulesPath = value;
|
||||
//RepList["RulesPath"] = safetyRulesPath;
|
||||
}
|
||||
if(param == "WAYCONFIGPARAMPATH")
|
||||
{
|
||||
wayParamPath = value;
|
||||
RepList["WayConfigPath"] = wayParamPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(planConfigPath == "")
|
||||
reportConfigWarning("NO TASK FILE PATH");
|
||||
// readTaskFile("a");
|
||||
if(planConfigPath == "")
|
||||
reportConfigWarning("NO TASK SAFETY RULES CONFIG");
|
||||
if(wayParamPath == "")
|
||||
reportConfigWarning("NO WAY PARAM CONFIG");
|
||||
|
||||
readSafetyRules();
|
||||
setSafetyRules(maxTime, maxDepth, minAltitude, safePolygon);
|
||||
readWayConfig();
|
||||
setWayConfig(lead,lead_damper,capture_line,capture_radius,slip_radius);
|
||||
|
||||
RegisterVariables();
|
||||
return(true);
|
||||
}
|
||||
@@ -549,20 +589,21 @@ bool TaskManger::setTaskTimer(string timeCount)
|
||||
bool TaskManger::setSafetyRules(string maxTime, string maxDepth, string minAltitude, string polygon)
|
||||
{
|
||||
string msgContent="";
|
||||
// msgContent += "name=op_region#";
|
||||
msgContent += "max_time=";
|
||||
msgContent += maxTime;
|
||||
msgContent += "#";
|
||||
msgContent += "max_depth=";
|
||||
msgContent += maxDepth;
|
||||
msgContent += "#";
|
||||
msgContent += "min_altitude=";
|
||||
msgContent += minAltitude;
|
||||
// msgContent += "#";
|
||||
// msgContent += "min_altitude=";
|
||||
// msgContent += minAltitude;
|
||||
msgContent += "#";
|
||||
msgContent += "polygon=";
|
||||
msgContent += polygon;
|
||||
|
||||
cout << " The Op_Region parm is : " << msgContent << endl;
|
||||
Notify(UPDATE_OPREGION, msgContent);
|
||||
cout << msgContent << endl;
|
||||
// Notify(UPDATE_OPREGION, msgContent);
|
||||
return true;
|
||||
}
|
||||
bool TaskManger::setWayConfig(string lead, string lead_damper, string capture_line, string capture_radius,string slip_radius)
|
||||
@@ -583,9 +624,8 @@ bool TaskManger::setWayConfig(string lead, string lead_damper, string capture_li
|
||||
msgContent += "#";
|
||||
msgContent += "slip_radius=";
|
||||
msgContent += slip_radius;
|
||||
|
||||
Notify(UPDATE_WPT, msgContent);
|
||||
cout << "Config waypoint parm is :" << msgContent << endl;
|
||||
cout << msgContent << endl;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -599,6 +639,7 @@ void TaskManger::RegisterVariables()
|
||||
// Register(MSG_START, 0);
|
||||
Register(MSG_WPTFLAG,0);
|
||||
Register(MSG_SENDSAFTRULES,0);
|
||||
Register(MGS_SENDWAYPARAM,0);
|
||||
Register(MSG_FALUT,0);
|
||||
Register(MSG_CLEARFAULT,0);
|
||||
Register(MSG_IN_SSM,0);
|
||||
@@ -614,7 +655,7 @@ void TaskManger::RegisterVariables()
|
||||
*/
|
||||
int TaskManger::readTaskFile(string taskName)
|
||||
{
|
||||
int faultNubmer = 0;
|
||||
int fault = 0;
|
||||
if(!nodeList.empty())
|
||||
nodeList.clear();
|
||||
ifstream ifs;
|
||||
@@ -631,7 +672,7 @@ int TaskManger::readTaskFile(string taskName)
|
||||
if (!inputJsonValue.isMember(taskName))
|
||||
{
|
||||
RepList["Task in File"] = "False";
|
||||
return faultNubmer=1;
|
||||
return fault=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -639,13 +680,13 @@ int TaskManger::readTaskFile(string taskName)
|
||||
string node="";
|
||||
currentTask = inputJsonValue[taskName];
|
||||
if(currentTask["taskName"].asString() != taskName)
|
||||
return faultNubmer=2;
|
||||
return fault=2;
|
||||
|
||||
double currentTask_maxTime = currentTask["duration"].asDouble();
|
||||
double repeat = currentTask["repeat"].asDouble();
|
||||
|
||||
if(!currentTask["points"].isArray())
|
||||
return faultNubmer=3;
|
||||
return fault=3;
|
||||
|
||||
Json::Value currentTask_Points = currentTask["points"];
|
||||
int ps_cnt = currentTask_Points.size();
|
||||
@@ -663,7 +704,7 @@ int TaskManger::readTaskFile(string taskName)
|
||||
else if(node_type == "track")
|
||||
node_type = "@2";
|
||||
else
|
||||
return faultNubmer=4;
|
||||
return fault=4;
|
||||
node = node_type;
|
||||
node += ",";
|
||||
node += node_x;
|
||||
@@ -688,24 +729,76 @@ int TaskManger::readTaskFile(string taskName)
|
||||
cout << "--------------------------------" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TaskManger::readSafetyRules(string fileName)
|
||||
//maxTime, maxDepth, minAltitude, safePolygon
|
||||
int TaskManger::readSafetyRules()
|
||||
{
|
||||
maxDepth = "30";
|
||||
maxTime = "1000";
|
||||
safePolygon = "pts={-80,-00:-30,-175:150,-100:95,25}";
|
||||
ifstream ifs;
|
||||
ifs.open(safetyRulesPath, ios::in);
|
||||
Json::Reader reader;
|
||||
Json::Value inputJsonValue;
|
||||
reader.parse(ifs, inputJsonValue);
|
||||
ifs.close();
|
||||
if(!inputJsonValue.isMember("maxTime")
|
||||
|| !inputJsonValue.isMember("maxDepth")
|
||||
|| !inputJsonValue.isMember("minAltitude")
|
||||
|| !inputJsonValue.isMember("points"))
|
||||
return 1;
|
||||
if(!inputJsonValue["points"].isArray())
|
||||
return 2;
|
||||
double time = inputJsonValue["maxTime"].asDouble() * 60;
|
||||
double depth = inputJsonValue["maxDepth"].asDouble();
|
||||
double altitude = inputJsonValue["minAltitude"].asDouble();
|
||||
maxTime = doubleToString(time);
|
||||
maxDepth = doubleToString(depth);
|
||||
minAltitude = doubleToString(altitude);
|
||||
|
||||
string pts = "";
|
||||
Json::Value points = inputJsonValue["points"];
|
||||
//"pts={-80,-00:-30,-175:150,-100:95,25}"
|
||||
int ps_cnt = points.size();
|
||||
for(int i=0; i<ps_cnt; i++)
|
||||
{
|
||||
string x = intToString(points[i]["north"].asInt());
|
||||
string y = intToString(points[i]["east"].asInt());
|
||||
if(pts=="")
|
||||
pts = x + "," + y ;
|
||||
else
|
||||
pts = pts + ":" + x + "," + y ;
|
||||
}
|
||||
safePolygon = pts;
|
||||
// safePolygon="pts={-80,-00:-30,-175:150,-100:9,2}";s
|
||||
RepList["safePolygon"] = safePolygon;
|
||||
RepList["maxTime"] = maxTime;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int TaskManger::readWayConfig(string filename)
|
||||
int TaskManger::readWayConfig()
|
||||
{
|
||||
lead = "8";
|
||||
lead_damper = "1";
|
||||
lead_to_start = "false";
|
||||
capture_line = "true";
|
||||
capture_radius = "5";
|
||||
slip_radius = "15";
|
||||
efficiency_measure = "all";
|
||||
ifstream ifs;
|
||||
ifs.open(wayParamPath, ios::in);
|
||||
Json::Reader reader;
|
||||
Json::Value inputJsonValue;
|
||||
reader.parse(ifs, inputJsonValue);
|
||||
ifs.close();
|
||||
if(!inputJsonValue.isMember("lead")
|
||||
|| !inputJsonValue.isMember("lead_damper")
|
||||
|| !inputJsonValue.isMember("lead_to_start")
|
||||
|| !inputJsonValue.isMember("capture_line")
|
||||
|| !inputJsonValue.isMember("capture_radius")
|
||||
|| !inputJsonValue.isMember("efficiency_measure")
|
||||
|| !inputJsonValue.isMember("slip_radius"))
|
||||
return 1;
|
||||
if(!inputJsonValue["points"].isArray())
|
||||
return 2;
|
||||
lead = doubleToString(inputJsonValue["lead"].asDouble());
|
||||
lead_damper = doubleToString(inputJsonValue["lead_damper"].asDouble());
|
||||
lead_to_start = boolToString(inputJsonValue["lead_to_start"].asBool());
|
||||
capture_line = boolToString(inputJsonValue["capture_line"].asBool());
|
||||
capture_radius = doubleToString(inputJsonValue["capture_radius"].asDouble());
|
||||
slip_radius = doubleToString(inputJsonValue["slip_radius"].asDouble());
|
||||
efficiency_measure = inputJsonValue["efficiency_measure"].asString();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -872,8 +965,8 @@ string TaskManger::getNodeName(const string node)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
else
|
||||
cout << "Warming: read Speed Parm Filed" << endl;
|
||||
// else
|
||||
// cout << "Warming: read Speed Parm Filed" << endl;
|
||||
// getWord(node, 3, depth);
|
||||
return name;
|
||||
}
|
||||
@@ -966,6 +1059,7 @@ bool TaskManger::buildReport()
|
||||
}
|
||||
m_msgs << "=========================================================" << endl;
|
||||
RepList["Current Node"] = current_node;
|
||||
RepList["Fault Number"] = faultNumber;
|
||||
RepList["remaining number of nodes"] = (int)nodeList.size()+1;
|
||||
string rep = Json::writeString(RepJsBuilder, RepList);
|
||||
m_msgs << rep << endl;
|
||||
@@ -991,11 +1085,6 @@ inline void TaskManger::InitConfig()
|
||||
Notify(MSG_WPTFLAG,"false");
|
||||
// Notify(MSG_START,"false");
|
||||
Notify(MSG_RUN,"false");
|
||||
//
|
||||
readSafetyRules("q");
|
||||
setSafetyRules(maxTime, maxDepth, minAltitude, safePolygon);
|
||||
readWayConfig("a");
|
||||
setWayConfig(lead,lead_damper,capture_line,capture_radius,slip_radius);
|
||||
}
|
||||
|
||||
void TaskManger::postReportToSSM()
|
||||
@@ -1005,7 +1094,10 @@ void TaskManger::postReportToSSM()
|
||||
msg["state"] = state;
|
||||
msg["taskName"] = taskName;
|
||||
msg["destName"] = getNodeName(current_node);
|
||||
msg["errorCode"] = faultNumber;
|
||||
if(faultNumber == 1111)
|
||||
msg["errorCode"] = 0;
|
||||
else
|
||||
msg["errorCode"] = faultNumber;
|
||||
// msg["progess"] =
|
||||
// msg["eta"] =
|
||||
RepList["toSSM"] = msg;
|
||||
|
||||
9
src/pTaskManagement/TaskManger.h
Normal file → Executable file
9
src/pTaskManagement/TaskManger.h
Normal file → Executable file
@@ -2,7 +2,7 @@
|
||||
* @Author: 1553836110 1553836110@qq.com
|
||||
* @Date: 2023-09-28 15:45:17
|
||||
* @LastEditors: zhaojingkui 1553836110@qq.com
|
||||
* @LastEditTime: 2023-11-23 15:29:09
|
||||
* @LastEditTime: 2023-11-29 11:51:56
|
||||
* @FilePath: /moos-ivp-pi/src/pTaskManagement/TaskManger.h
|
||||
* @Description:
|
||||
*
|
||||
@@ -65,8 +65,8 @@ class TaskManger : public AppCastingMOOSApp
|
||||
TaskType getTaskTpye(const string node);
|
||||
|
||||
int readTaskFile(string taskName);
|
||||
int readSafetyRules(string fileName);
|
||||
int readWayConfig(string fileName);
|
||||
int readSafetyRules();
|
||||
int readWayConfig();
|
||||
void postReportToSSM();
|
||||
|
||||
inline void clearHelmFlag(){Notify("HELM_MAP_CLEAR",0.0);}
|
||||
@@ -90,6 +90,7 @@ class TaskManger : public AppCastingMOOSApp
|
||||
const string MSG_FALUT = "TaskFault";
|
||||
const string MSG_RUN = "RUN";
|
||||
const string MSG_CLEARFAULT = "ClearFalut";
|
||||
const string MGS_SENDWAYPARAM = "SendWatParam"; //TODO:增加路径参数配置
|
||||
|
||||
const string MSG_IN_SSM = "uMission_action_cmd";
|
||||
const string MSG_TO_SSM = "uMission_task_fb";
|
||||
@@ -141,6 +142,8 @@ private:
|
||||
//任务文件参数
|
||||
//TODO:动态配置任务文件等参数
|
||||
string planConfigPath;
|
||||
string safetyRulesPath;
|
||||
string wayParamPath;
|
||||
vector<string> taskList;
|
||||
int taskCount;
|
||||
string taskName;
|
||||
|
||||
0
src/pTaskManagement/TaskMangerMain.cpp
Normal file → Executable file
0
src/pTaskManagement/TaskMangerMain.cpp
Normal file → Executable file
@@ -1,181 +0,0 @@
|
||||
//-------- FILE: alpha.bhv -------------
|
||||
initialize RUN = false
|
||||
initialize TaskNum=t1
|
||||
initialize SendTask=false
|
||||
//--------------模式判断------------------------
|
||||
set MODE = ACTIVE{
|
||||
RUN=true
|
||||
} INACTIVE
|
||||
|
||||
set MODE = T1{
|
||||
MODE=ACTIVE
|
||||
TaskNum = t1
|
||||
}
|
||||
|
||||
|
||||
//----------路径点任务----------------------------
|
||||
Behavior = BHV_Waypoint
|
||||
{
|
||||
name = waypt_survey
|
||||
pwt = 100 //优先权重
|
||||
condition = MODE==T1
|
||||
|
||||
//endflag = START=false
|
||||
endflag = END_WayPoint=true
|
||||
|
||||
configflag = CRUISE_SPD = $[SPEED]
|
||||
//configflag = OSPOS = $[OSX],$[OSY]
|
||||
|
||||
activeflag = INFO=$[OWNSHIP]
|
||||
activeflag = INFO=$[BHVNAME]
|
||||
activeflag = INFO=$[BHVTYPE]
|
||||
|
||||
//cycleflag = CINFO=$[OSX],$[OSY]
|
||||
|
||||
wptflag = CurrentPointComplete=true
|
||||
wptflag = PREV=$(PX),$(PY)
|
||||
wptflag = NEXT=$(NX),$(NY)
|
||||
wptflag = TEST=$(X),$(Y)
|
||||
wptflag = OSPOS=$(OSX),$(OSY)
|
||||
//wptflag_on_start = true
|
||||
|
||||
|
||||
updates = WPT_UPDATE
|
||||
//perpetual = true
|
||||
|
||||
templating = spawn
|
||||
|
||||
// speed_alt = 1.2
|
||||
//use_alt_speed = true
|
||||
lead = 8
|
||||
lead_damper = 1
|
||||
lead_to_start = false
|
||||
speed = 1 // meters per second
|
||||
capture_line = true
|
||||
capture_radius = 5.0
|
||||
slip_radius = 15.0
|
||||
efficiency_measure = all
|
||||
|
||||
polygon = 60,-40
|
||||
order = normal
|
||||
//repeat = 3
|
||||
|
||||
visual_hints = nextpt_color=yellow
|
||||
visual_hints = nextpt_vertex_size=8
|
||||
visual_hints = nextpt_lcolor=gray70
|
||||
visual_hints = vertex_color=dodger_blue, edge_color=white
|
||||
visual_hints = vertex_size=5, edge_size=1
|
||||
}
|
||||
|
||||
|
||||
//--------------定深任务------------------
|
||||
Behavior=BHV_ConstantDepth
|
||||
{
|
||||
name = const_depth
|
||||
pwt = 100
|
||||
//condition = DEPLOY = true
|
||||
condition = MODE==T1
|
||||
duration = no-time-limit
|
||||
updates = DEPTH_UPDATE
|
||||
depth = 0
|
||||
}
|
||||
|
||||
//--------------定向任务--------------------
|
||||
|
||||
Behavior=BHV_ConstantHeading
|
||||
{
|
||||
name = const_heading
|
||||
pwt = 100
|
||||
//condition = START_TURN = true
|
||||
//condition = DEPLOY = true
|
||||
condition = MODE==T3
|
||||
perpetual = true
|
||||
|
||||
activeflag = TURN = started
|
||||
|
||||
//endflag = TURN = done
|
||||
//endflag = RETURN = true
|
||||
//endflag = START_TURN = false
|
||||
endflag = START=false
|
||||
|
||||
heading = 225
|
||||
complete_thresh = 5
|
||||
duration = no-time-limit
|
||||
}
|
||||
|
||||
//--------------定速任务--------------------
|
||||
Behavior=BHV_ConstantSpeed
|
||||
{
|
||||
name = const_speed
|
||||
pwt = 1000
|
||||
condition = MODE==T1
|
||||
perpetual = true
|
||||
updates = SPEED_UPDATE
|
||||
//endflag = START=false
|
||||
|
||||
speed = 5
|
||||
|
||||
duration = no-time-limit
|
||||
//peakwidth = 0.5
|
||||
//basewidth = 0.5
|
||||
|
||||
}
|
||||
//----------------安全模式-----------------------
|
||||
//----------------计时器---------------------
|
||||
Behavior = BHV_Timer
|
||||
{
|
||||
name = mtime
|
||||
condition = MODE==T1
|
||||
pwt = 100
|
||||
templating = spawn
|
||||
//duration_status = MSTATUS
|
||||
//duration = 10
|
||||
endflag = TIME_OUT=true
|
||||
|
||||
updates = TIMER_UPDATES
|
||||
|
||||
//perpetual = true
|
||||
}
|
||||
//-------------最大深度限制--------------------------
|
||||
Behavior = BHV_MaxDepth
|
||||
{
|
||||
name = maxdepth
|
||||
pwt = 200
|
||||
condition = MODE==ACTIVE
|
||||
updates = MAXDEEP_UPDATES
|
||||
max_depth = 20
|
||||
tolerance = 0
|
||||
duration = no-time-limit
|
||||
}
|
||||
//--------------安全区域设置-----------------------
|
||||
|
||||
Behavior = BHV_OpRegion
|
||||
{
|
||||
// General Behavior Parameters
|
||||
// ---------------------------
|
||||
name = op_region // example
|
||||
pwt = 300 // default
|
||||
condition = MODE==TN
|
||||
updates = OPREGION_UPDATES // example
|
||||
|
||||
// Parameters specific to this behavior
|
||||
// ------------------------------------
|
||||
max_time = 20 // default (seconds)
|
||||
max_depth = 25 // default (meters)
|
||||
min_altitude = 0 // default (meters)
|
||||
reset_var = OPREGION_RESET // example
|
||||
trigger_entry_time = 1 // default (seconds)
|
||||
trigger_exit_time = 0.5 // default (seconds)
|
||||
|
||||
polygon = pts={-80,-00:-30,-175:150,-100:95,25}
|
||||
|
||||
breached_altitude_flag = TaskFault = AltitudeOut
|
||||
breached_depth_flag = TaskFault = DepthOut
|
||||
breached_poly_flag = TaskFault = RegionOut
|
||||
breached_time_flag = TaskFault = TimeOut
|
||||
|
||||
visual_hints = vertex_color = brown // default
|
||||
visual_hints = vertex_size = 3 // default
|
||||
visual_hints = edge_color = aqua // default
|
||||
visual_hints = edge_size = 1 // default
|
||||
}
|
||||
@@ -1,269 +0,0 @@
|
||||
//-------------------------------------------------
|
||||
// NAME: M. Benjamin, MIT CSAIL
|
||||
// FILE: alpha.moos
|
||||
//-------------------------------------------------
|
||||
|
||||
ServerHost = localhost
|
||||
ServerPort = 9000
|
||||
Community = pi
|
||||
MOOSTimeWarp = 1
|
||||
|
||||
// Forest Lake
|
||||
LatOrigin = 43.825300
|
||||
LongOrigin = -70.330400
|
||||
|
||||
// MIT Sailing Pavilion (use this one)
|
||||
// LatOrigin = 42.358456
|
||||
// LongOrigin = -71.087589
|
||||
|
||||
//------------------------------------------
|
||||
// Antler configuration block
|
||||
ProcessConfig = ANTLER
|
||||
{
|
||||
MSBetweenLaunches = 200
|
||||
|
||||
Run = MOOSDB @ NewConsole = false
|
||||
//Run = pLogger @ NewConsole = false
|
||||
Run = uSimMarineV22 @ NewConsole = false
|
||||
Run = pMarinePIDV22 @ NewConsole = false
|
||||
Run = pHelmIvP @ NewConsole = false
|
||||
Run = pMarineViewer @ NewConsole = false
|
||||
Run = uProcessWatch @ NewConsole = false
|
||||
Run = pNodeReporter @ NewConsole = false
|
||||
Run = pRealm @ NewConsole = false
|
||||
Run = pTaskManger @ NewConsole = false
|
||||
//Run = uTimerScript @ NewConsole = false
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pLogger config block
|
||||
ProcessConfig = pTaskManger
|
||||
{
|
||||
AppTick = 8
|
||||
CommsTick = 8
|
||||
|
||||
planConfigPath = /home/zjk/Desktop/project/moos-ivp-extend/PlanConfigure.json
|
||||
}
|
||||
ProcessConfig = pLogger
|
||||
{
|
||||
AppTick = 8
|
||||
CommsTick = 8
|
||||
|
||||
AsyncLog = true
|
||||
|
||||
// For variables that are published in a bundle on their first post,
|
||||
// explicitly declare their logging request
|
||||
//Log = IVPHELM_LIFE_EVENT @ 0 NOSYNC
|
||||
//Log = REPORT @ 0 NOSYNC
|
||||
//Log = BHV_SETTINGS @ 0 NOSYNC
|
||||
Log = OPREGION_RESET @ 0 NOSYNC
|
||||
|
||||
LogAuxSrc = true
|
||||
WildCardLogging = true
|
||||
WildCardOmitPattern = *_STATUS
|
||||
WildCardOmitPattern = DB_VARSUMMARY
|
||||
WildCardOmitPattern = DB_RWSUMMARY
|
||||
WildCardExclusionLog = true
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// uProcessWatch config block
|
||||
|
||||
ProcessConfig = uProcessWatch
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
watch_all = true
|
||||
nowatch = uPokeDB*
|
||||
nowatch = uQueryDB*
|
||||
nowatch = uXMS*
|
||||
nowatch = uMAC*
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// uSimMarineV22 config block
|
||||
|
||||
ProcessConfig = uSimMarineV22
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
start_pos = x=0, y=-20, heading=180, speed=5
|
||||
|
||||
prefix = NAV
|
||||
|
||||
turn_rate = 40
|
||||
thrust_map = 0:0, 20:1, 40:2, 60:3, 80:4, 100:5
|
||||
//thrust_reflect = true
|
||||
|
||||
buoyancy_rate = 0.075
|
||||
max_depth_rate = 5
|
||||
max_depth_rate_speed = 2.0
|
||||
default_water_depth = 400
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pHelmIvP config block
|
||||
|
||||
ProcessConfig = pHelmIvP
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
behaviors = alpha.bhv
|
||||
domain = course:0:359:360
|
||||
domain = speed:0:10:101
|
||||
domain = depth:0:100:101
|
||||
|
||||
park_on_allstop = false
|
||||
//park_on_allstop = true
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pMarinePID config block
|
||||
|
||||
ProcessConfig = pMarinePIDV22
|
||||
{
|
||||
AppTick = 20
|
||||
CommsTick = 20
|
||||
|
||||
verbose = true
|
||||
depth_control = true
|
||||
|
||||
// SIM_INSTABILITY = 20
|
||||
|
||||
// Yaw PID controller
|
||||
yaw_pid_kp = 1.2
|
||||
yaw_pid_kd = 0.0
|
||||
yaw_pid_ki = 0.3
|
||||
yaw_pid_integral_limit = 0.07
|
||||
|
||||
// Speed PID controller
|
||||
speed_pid_kp = 1.0
|
||||
speed_pid_kd = 0.0
|
||||
speed_pid_ki = 0.1
|
||||
speed_pid_integral_limit = 0.07
|
||||
|
||||
maxpitch = 15
|
||||
maxelevator = 13
|
||||
|
||||
pitch_pid_kp = 1.5
|
||||
pitch_pid_kd = 0
|
||||
pitch_pid_ki = 1.0
|
||||
pitch_pid_integral_limit = 0
|
||||
|
||||
z_to_pitch_pid_kp = 0.12
|
||||
z_to_pitch_pid_kd = 0
|
||||
z_to_pitch_pid_ki = 0.004
|
||||
z_to_pitch_pid_integral_limit = 0.05
|
||||
|
||||
|
||||
//MAXIMUMS
|
||||
maxrudder = 100
|
||||
maxthrust = 100
|
||||
|
||||
// A non-zero SPEED_FACTOR overrides use of SPEED_PID
|
||||
// Will set DESIRED_THRUST = DESIRED_SPEED * SPEED_FACTOR
|
||||
speed_factor = 0
|
||||
simulation = true
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pMarineViewer config block
|
||||
|
||||
ProcessConfig = pMarineViewer
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
tiff_file = forrest19.tif
|
||||
//tiff_file = MIT_SP.tif
|
||||
vehicles_name_mode = names+depth //+shortmode
|
||||
|
||||
|
||||
set_pan_x = -90
|
||||
set_pan_y = -280
|
||||
zoom = 0.65
|
||||
vehicle_shape_scale = 1.5
|
||||
hash_delta = 50
|
||||
hash_shade = 0.22
|
||||
hash_viewable = true
|
||||
|
||||
trails_point_size = 1
|
||||
|
||||
//op_vertex = x=-83, y=-47, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
//op_vertex = x=-46.4, y=-129.2, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
//op_vertex = x=94.6, y=-62.2, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
//op_vertex = x=58, y=20, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
|
||||
// Appcast configuration
|
||||
appcast_height = 75
|
||||
appcast_width = 30
|
||||
appcast_viewable = true
|
||||
appcast_color_scheme = indigo
|
||||
nodes_font_size = xlarge
|
||||
procs_font_size = xlarge
|
||||
appcast_font_size = large
|
||||
|
||||
// datum_viewable = true
|
||||
// datum_size = 18
|
||||
// gui_size = small
|
||||
|
||||
// left_context[survey-point] = DEPLOY=true
|
||||
// left_context[survey-point] = MOOS_MANUAL_OVERRIDE=false
|
||||
// left_context[survey-point] = RETURN=false
|
||||
|
||||
right_context[return] = DEPLOY=true
|
||||
right_context[return] = MOOS_MANUAL_OVERRIDE=false
|
||||
right_context[return] = RETURN=false
|
||||
|
||||
scope = RETURN
|
||||
scope = WPT_STAT
|
||||
scope = VIEW_SEGLIST
|
||||
scope = VIEW_POINT
|
||||
scope = VIEW_POLYGON
|
||||
scope = MVIEWER_LCLICK
|
||||
scope = MVIEWER_RCLICK
|
||||
|
||||
//button_one = START # START=true
|
||||
button_one = START # uMission_action_cmd={"taskName":"east_waypt_survey","action":"start"}
|
||||
//button_one = MOOS_MANUAL_OVERRIDE=false
|
||||
button_two = STOP # START=false
|
||||
//button_two = MOOS_MANUAL_OVERRIDE=true
|
||||
button_three = FaultClear # ClearFalut = true
|
||||
button_four = SendSecurityZone # SendSaftRules = true
|
||||
|
||||
|
||||
action = MENU_KEY=deploy # DEPLOY = true # RETURN = false
|
||||
action+ = MENU_KEY=deploy # MOOS_MANUAL_OVERRIDE=false
|
||||
action = RETURN=true
|
||||
action = UPDATES_RETURN=speed=1.4
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pNodeReporter config block
|
||||
|
||||
ProcessConfig = pNodeReporter
|
||||
{
|
||||
AppTick = 2
|
||||
CommsTick = 2
|
||||
|
||||
//platform_type = kayak
|
||||
//更改显示形状为uuv
|
||||
platform_type = UUV
|
||||
platform_color = red
|
||||
platform_length = 4
|
||||
}
|
||||
|
||||
ProcessConfig = uTimerScript
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
condition = DEPLOY = true
|
||||
randvar = varname = RND_DEPTH, min=20, max=80, key=at_reset
|
||||
event = var = DEPTH_UPDATE, val=depth=$[RND_DEPTH], time=120
|
||||
reset_max = nolimit reset_time = all-posted
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/bin/bash
|
||||
#--------------------------------------------------------------
|
||||
# Script: clean.sh
|
||||
# Author: Michael Benjamin
|
||||
# Date: June 2020
|
||||
#----------------------------------------------------------
|
||||
# Part 1: Declare global var defaults
|
||||
#----------------------------------------------------------
|
||||
VERBOSE=""
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Part 2: Check for and handle command-line arguments
|
||||
#-------------------------------------------------------
|
||||
for ARGI; do
|
||||
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
|
||||
echo "clean.sh [SWITCHES] "
|
||||
echo " --verbose "
|
||||
echo " --help, -h "
|
||||
exit 0;
|
||||
elif [ "${ARGI}" = "--verbose" -o "${ARGI}" = "-v" ] ; then
|
||||
VERBOSE="-v"
|
||||
else
|
||||
echo "clean.sh: Bad Arg:" $ARGI
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Part 2: Do the cleaning!
|
||||
#-------------------------------------------------------
|
||||
if [ "${VERBOSE}" = "-v" ]; then
|
||||
echo "Cleaning: $PWD"
|
||||
fi
|
||||
rm -rf $VERBOSE MOOSLog_* XLOG_* LOG_*
|
||||
rm -f $VERBOSE *~ *.moos++
|
||||
rm -f $VERBOSE targ_*
|
||||
rm -f $VERBOSE .LastOpenedMOOSLogDirectory
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
#----------------------------------------------------------
|
||||
# Script: launch.sh
|
||||
# Author: Michael Benjamin
|
||||
# LastEd: May 20th 2019
|
||||
#----------------------------------------------------------
|
||||
# Part 1: Set Exit actions and declare global var defaults
|
||||
#----------------------------------------------------------
|
||||
TIME_WARP=1
|
||||
COMMUNITY="alpha"
|
||||
GUI="yes"
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Part 2: Check for and handle command-line arguments
|
||||
#----------------------------------------------------------
|
||||
for ARGI; do
|
||||
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
|
||||
echo "launch.sh [SWITCHES] [time_warp] "
|
||||
echo " --help, -h Show this help message "
|
||||
exit 0;
|
||||
elif [ "${ARGI}" = "--nogui" ] ; then
|
||||
GUI="no"
|
||||
elif [ "${ARGI//[^0-9]/}" = "$ARGI" -a "$TIME_WARP" = 1 ]; then
|
||||
TIME_WARP=$ARGI
|
||||
else
|
||||
echo "launch.sh Bad arg:" $ARGI " Exiting with code: 1"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Part 3: Launch the processes
|
||||
#----------------------------------------------------------
|
||||
echo "Launching $COMMUNITY MOOS Community with WARP:" $TIME_WARP
|
||||
pAntler $COMMUNITY.moos --MOOSTimeWarp=$TIME_WARP >& /dev/null &
|
||||
|
||||
uMAC -t $COMMUNITY.moos
|
||||
kill -- -$$
|
||||
4
src/pTaskManagement/pTaskManger.moos
Normal file → Executable file
4
src/pTaskManagement/pTaskManger.moos
Normal file → Executable file
@@ -7,6 +7,8 @@ ProcessConfig = pTaskManger
|
||||
{
|
||||
AppTick = 10
|
||||
CommsTick = 10
|
||||
planConfigPath = /home/zjk/Desktop/project/moos-ivp-extend/PlanConfigure.json
|
||||
planConfigPath = /home/zjk/project/work/moos-ivp-pi/setting/PlanConfigure.json
|
||||
safetyRulesPath = /home/zjk/project/work/moos-ivp-pi/setting/SafetyRules.json
|
||||
wayConfigParamPath = /home/zjk/project/work/moos-ivp-pi/setting/WayConfigParam.json
|
||||
}
|
||||
|
||||
|
||||
0
src/pTaskSend/CMakeLists.txt
Normal file → Executable file
0
src/pTaskSend/CMakeLists.txt
Normal file → Executable file
0
src/pTaskSend/TaskSend.cpp
Normal file → Executable file
0
src/pTaskSend/TaskSend.cpp
Normal file → Executable file
0
src/pTaskSend/TaskSend.h
Normal file → Executable file
0
src/pTaskSend/TaskSend.h
Normal file → Executable file
0
src/pTaskSend/TaskSendMain.cpp
Normal file → Executable file
0
src/pTaskSend/TaskSendMain.cpp
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/query/client-vscode/query.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/query/client-vscode/query.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/cache-v2-d6d942c4138e4121aadf.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/cache-v2-d6d942c4138e4121aadf.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/cmakeFiles-v1-1b864ed9ef170e655086.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/cmakeFiles-v1-1b864ed9ef170e655086.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/codemodel-v2-8cafde00da2f94adfddf.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/codemodel-v2-8cafde00da2f94adfddf.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/index-2023-09-21T07-09-11-0928.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/index-2023-09-21T07-09-11-0928.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/target-pTaskSend-Debug-fe070126a6f1fe44e26b.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/target-pTaskSend-Debug-fe070126a6f1fe44e26b.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/toolchains-v1-2781238ec0fa0b9996f9.json
Normal file → Executable file
0
src/pTaskSend/build/.cmake/api/v1/reply/toolchains-v1-2781238ec0fa0b9996f9.json
Normal file → Executable file
0
src/pTaskSend/display.cpp
Normal file → Executable file
0
src/pTaskSend/display.cpp
Normal file → Executable file
0
src/pTaskSend/display.h
Normal file → Executable file
0
src/pTaskSend/display.h
Normal file → Executable file
0
src/pTaskSend/pTaskSend.moos
Normal file → Executable file
0
src/pTaskSend/pTaskSend.moos
Normal file → Executable file
Reference in New Issue
Block a user