modify COMPARE_N in tool, modify attribute of vehicle by using tensor

This commit is contained in:
2024-06-13 23:35:25 +02:00
parent 13f91583bb
commit 9927d6642c
12 changed files with 217 additions and 56 deletions
+2 -2
View File
@@ -326,7 +326,7 @@ void print2D_blocks_indexOne_withPoint(struct blocks *blk, float scale_x, float
if(in)
printf("%d",in);
else
printf(" ");
printf("."); //printf(" ");
printf("\033[0;37m"); // white
}
printf("\n");
@@ -478,7 +478,7 @@ void step(struct vehicle *v, int action){
status->reward = 0;
status->done =false;
struct blocks * path = v->path;
printf(" center : %f vs %f direction: %f\n",v->sensor->value[CENTER], LIMIT_DISTANCE, v->direction);
//printf(" center : %f vs %f direction: %f\n",v->sensor->value[CENTER], LIMIT_DISTANCE, v->direction);
if( v->sensor->value[CENTER]<= LIMIT_DISTANCE ){
status->reward = REWARD_STOP;
status->done = true;