|
@@ -840,25 +840,8 @@ void iv::decition::BrainDecition::run() {
|
|
|
iv::modulecomm::ModuleSendMsg(mpaObsTraceLeft,(char *)(ServiceCarStatus.obsTraceLeft.data()),ServiceCarStatus.obsTraceLeft.size()*sizeof(iv::TracePoint));
|
|
|
iv::modulecomm::ModuleSendMsg(mpaObsTraceRight,(char *)(ServiceCarStatus.obsTraceRight.data()),ServiceCarStatus.obsTraceRight.size()*sizeof(iv::TracePoint));
|
|
|
|
|
|
-
|
|
|
- // decition_gps = decitionLine00->getDecideFromGPS(*gps_data_, navigation_data, obs_lidar_grid_);
|
|
|
- //ODS("\n决策:%f\t%f\t\t", decition_gps->speed, decition_gps->wheel_angle);
|
|
|
- //ODS("\n接收到的实时GPS数据:%f\t%f\t%f\n", gps_data_->gps_x, gps_data_->gps_y,gps_data_->ins_heading_angle);
|
|
|
-
|
|
|
- //carcall->is_arrived = decitionGps00->is_arrivaled;
|
|
|
- //double end = GetTickCount();
|
|
|
decision_period = start - last;
|
|
|
std::cout<<ServiceCarStatus.mRunTime.elapsed()<<"ms:"<< "\n周期时长:%f\n" << decision_period << std::endl;
|
|
|
- // iv::decition::VehicleStateBasic vsb;
|
|
|
- // vsb.mbBocheEnable = ServiceCarStatus.bocheEnable;
|
|
|
- // vsb.mfLidarObs = ServiceCarStatus.mLidarObs;
|
|
|
- // vsb.mfRadarObs = ServiceCarStatus.mRadarObs;
|
|
|
- // vsb.mfObs = ServiceCarStatus.mRadarObs;
|
|
|
- // vsb.decision_period = decision_period;
|
|
|
- // vsb.mbBrainRunning = ServiceCarStatus.mbBrainCtring;
|
|
|
- //// mpaVechicleState->writemsg((char *)&vsb,sizeof(iv::decition::VehicleStateBasic));
|
|
|
-
|
|
|
- // iv::modulecomm::ModuleSendMsg(mpaVechicleState,(char *)&vsb,sizeof(iv::decition::VehicleStateBasic));
|
|
|
|
|
|
iv::brain::brainstate xbs;
|
|
|
xbs.set_mbbocheenable(ServiceCarStatus.bocheEnable);
|
|
@@ -869,12 +852,8 @@ void iv::decition::BrainDecition::run() {
|
|
|
xbs.set_decision_period(decision_period);
|
|
|
ShareBrainstate(xbs);
|
|
|
|
|
|
-
|
|
|
- // decitionExecuter->executeDecition(decition_gps);
|
|
|
ShareDecition(decition_gps);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
iv::brain::carstate car_xbs;
|
|
|
car_xbs.set_mstate(ServiceCarStatus.mvehState);
|
|
|
car_xbs.set_mavoidx(ServiceCarStatus.mavoidX);
|
|
@@ -891,15 +870,22 @@ void iv::decition::BrainDecition::run() {
|
|
|
std::cout<<ServiceCarStatus.mRunTime.elapsed()<<"ms:"<< "\n决策速度:%f\n" << decition_gps->speed << std::endl;
|
|
|
|
|
|
iv::bridge::sender brainSendRubbish;
|
|
|
- if(ServiceCarStatus.brain_control_invalid==1){
|
|
|
- brainSendRubbish.set_carctrl(ServiceCarStatus.brain_control_invalid);
|
|
|
+ if(ServiceCarStatus.cameraStart==1){
|
|
|
+ brainSendRubbish.set_camerastart(ServiceCarStatus.cameraStart);
|
|
|
ShareRubbishControl(brainSendRubbish);
|
|
|
}
|
|
|
+ if(ServiceCarStatus.rubbish_dump==1){
|
|
|
+ brainSendRubbish.set_rbshboxctrl(ServiceCarStatus.rubbish_dump);
|
|
|
+ ShareRubbishControl(brainSendRubbish);
|
|
|
+ ServiceCarStatus.rubbish_dump=0;
|
|
|
+ }
|
|
|
+ if(ServiceCarStatus.rubbish_empty==1){
|
|
|
+ brainSendRubbish.set_rbshboxctrl(0);
|
|
|
+ ShareRubbishControl(brainSendRubbish);
|
|
|
+ ServiceCarStatus.rubbish_empty=0;
|
|
|
+ }
|
|
|
|
|
|
last = start;
|
|
|
- //decitionMaker->decideFromGPS(decition_gps, gps_data_, navigation_data); //gps_data_为当前读到的gps位置信息 navigation_data为导航数据 decition_gps为根据前两者得出的决策速度与决策角度
|
|
|
- // }
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if (handPark && decition_gps != NULL)
|