ARIA-Users
Date Index
Thread Index
Re: [Aria-users] Robots' initial positions when choosing "Createa new robot for each connection" in MobileSim
- To: aria-users@xxxxxxxxxxxxxx
- Subject: Re: [Aria-users] Robots' initial positions when choosing "Createa new robot for each connection" in MobileSim
- From: Reed Hedges <reed@xxxxxxxxxxxxxxxx>
- Date: Tue, 27 May 2008 09:02:27 -0400
- Cc: aria-users@xxxxxxxxxxxxxxxx
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=UTF-8; format=flowed
- Delivered-To: aria-archives@activmedia.com
- Delivered-To: aria-users@server.local.net
- In-Reply-To: <29251047.258051211620208581.JavaMail.coremail@bj126app20.126.com>
- References: <29251047.258051211620208581.JavaMail.coremail@bj126app20.126.com>
- Resent-Date: Tue, 27 May 2008 10:05:42 -0400 (EDT)
- Resent-From: aria-users@xxxxxxxxxxxxxx
- Resent-Message-ID: <jzh1y.A.fXD.2UBPIB@server.activmedia.com>
- Resent-Reply-To: aria-users@activmedia.com
- Resent-Sender: aria-users-request@xxxxxxxxxxxxxx
- User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)
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