wiki:BabyTigers-R/llsf-refbox

Version 1 (modified by Wataru UEMURA, 5 years ago) (diff)

--

TracNav

  • TOC "TOC:BTR" is empty!

BabyTigers - R : LLSF-refbox

  • The following link provides you the ubuntu iso file with RefBox.
    • [DOWNLOAD] modified Ubuntu 12.10 instalation dvd image with refbox (1.1GB) --- 2014/07/01 updated.
      • 27cae760aa7300c4ac302f40eb337b22 install-refbox_2014_07_15.iso
    • Openssh-server is automatically reconfigured after booting up.
      • sudo dpkg-reconfigure opnssh-server
    • Then the SSH2 keys are cleared. So please delete key data from ~/.ssh/known_hosts of your client computer.

LLSF: communication program between ProtoBuf and !RoboView2

  • In 2014 LLSF requires the communication between RefBox and your robots using ProtoBuf.
  • However, !RoboView2 cannot connect to the RefBox because communication format of !RoboView2 is not variable length.
  • Now I provide you the relay program between ProtoBuf and !RoboView2.

  • src/tools/llsf-view2.cpp is the relay program which is made from llsf-fake-robot.cpp.
  • This program uses 3 virtual IPs related to robotinos.
    • So please use this program with 4 arguments which includes 3 robotinos' names and 1 team name.
    • And you need enter following commands as root (llsf-refbox/view2/mkif.sh).
      ifconfig eth0:0 (virtual IP #1)
      ifconfig eth0:1 (virtual IP #2)
      ifconfig eth0:2 (virtual IP #3)
      
    • Then setup config.yaml at the robotino1 to robotino3 fields.
    • And both view2send and view2recv fields shows the file name from/to communication of ProtoBuf?.
  • If you use roboView2 on Windows-OS, then please run samba (sudo smbd).
    • And you can access the Linux file system via your explorer.
    • Please use refbox-view2.rvw2 as the sample program (at llsf-refbox/view2).

communication format between RefBox and View2 via the file

  • file format is
    • fprintf(fp, "%d\t%d\t", sendData.phase, sendData.state);
    • for(int i = 0; i < 3; i++) fprintf(fp, "%d\t", sendData.quantity_requested[i]);
    • for(int i = 0; i < 3; i++) fprintf(fp, "%d\t", sendData.quantity_delivered[i]);
    • for(int i = 0; i < 5; i++) for(int j = 0; j < 3; j++) fprintf(fp, "%d\t", sendData.lspec_state[i][j]);
    • for(int i = 0; i < 24; i++) fprintf(fp, "%d\t", sendData.mType[i]);
    • for(int i = 0; i < 24; i++) fprintf(fp, "%d\t", sendData.mColor[i]);

At RefBox-view2 uses these variables.

  • <BeaconSignal>
    • std::string view2_robots;
      • view2_robots = "Detected robot: " + b->team_name() + ":" + b->peer_name();
  • <GameState>
    • std::string view2_time;
      • sprintf(time, "%02i:%02i:%02i", hour, min, sec);
      • view2_time = time;
    • std::string view2_phase;
      • view2_phase = llsf_msgs::GameState::Phase_Name(gs->phase());
    • std::string view2_state;
      • view2_state = llsf_msgs::GameState::State_Name(gs->state());
    • std::string view2_points;
      • sprintf(point, "%u:%u", gs->points_cyan(), gs->points_magenta());
      • view2_points = point;
  • <OrderInfo>
    • std::string view2_oa[12];
      • sprintf(u, "%u", o.quantity_delivered());
      • view2_oa[o.id() - 1] = u;
    • std::string view2_ob[12];
      • sprintf(u, "%u", o.quantity_requested());
      • view2_ob[o.id() - 1] = u;
    • std::string view2_otime[11];
      • view2_otime[o.id() - 1] = time;
    • std::string view2_odest[11];
      • view2_odest[o.id() - 1] = llsf_msgs::Order::!DeliveryGate_Name(o.delivery_gate());
  • <VersionInfo>
  • <ExplorationInfo>
    • sendData.lspec_state[es.type()[1] - '1'][lspec.color()] = lspec.state();
  • <MachineInfo>
    • sendData.mType[std::atoi(m.name().substr(1, 2).c_str())] = std::atoi(m.type().substr(1, 2).c_str());
  • <MachineReportInfo>
  • <RobotInfo>
  • Others
    • std::string view2_message;
    • std::string view2_log[10];
    • std::string view2_p[24];
    • std::string view2_t[10];
    • std::string view2_sigG[16];
    • std::string view2_sigY[16];
    • std::string view2_sigR[16];
    • std::string view2_pk[10];
    • int m_type[11];
    • unsigned int gameHour, gameMin, gameSec;

Advice for install of RefBox

  • If you use Ubuntu 12.10, please install following packages.
    apt-get install libncurses5-dev libprotoc-dev
    

install RefBox to your machine easily

  • Please use this [DOWNLOAD] modified Ubuntu 12.10 instalation dvd image
  • You can install Ubuntu 12.10 with RefBox by using this ISO to your desktop, laptop, and/or virtual computer.
  • After boot this ISO, default selecting is live - boot the Live System. So please select install - start the installer directly, if you want to make your machine using this ISO.
  • username : robotino, password : robotino.