ARIA-Users

Date Index Thread Index

Re: [Aria-users] Robots' initial positions when choosing "Createa new robot for each connection" in MobileSim




Hello,

You can run MobileSim on a command line with the --start option to select a 
different position (a specific position, an arbitrary position but outside the 
map, or a random position).  If the map has a home point or dock point, it will 
also use that as the starting point instead of 0,0,0 -- however all robots will 
still use this position.

You can move the robot after your client program is connected, use the 
SIM_SET_POSE command #24. This command takes three 32-bit (4-byte) integers as 
arguments, so you need to send it like this:

     ArRobotPacket pkt;
     pkt.setID(ArCommands::SIM_SET_POSE);
     pkt.uByteToBuf(0); // argument type: ignored.
     pkt.byte4ToBuf(x);
     pkt.byte4ToBuf(y);
     pkt.byte4ToBuf(th);
     pkt.finalizePacket();
     robot.getDeviceConnection()->write(pkt.getBuf(), pkt.getLength());

Reed