|
From: haradin <jr...@cs...> - 2007-09-07 06:43:47
|
I'm having problems with a PeopleBot from ActivMedia.
I've remote controlled it in a closed off area while it takes down a log
file.
I put that log file through pmaptest and obtained a map of the environment
in .pgm format.
I then feed the map back to player through amcl and wavefront.
I use java-client to setup a planner interface and order it to go to a
coordinate which is within the map.
and here is the error: the robot turns 90 degrees on the spot then goes back
to the way it was.
Has anyone had this problem before?
Here is my config file:
# Desc: UNSW's Basic Pioneer2/3DX with laser and sony ptz
driver
(
name "p2os"
provides ["odometry:::position2d:0"
"sonar:0"
"aio:0"
"dio:0"
"gripper:0"
"power:0"]
port "/dev/ttyS0"
)
driver
(
name "sicklms200"
provides ["laser:0"]
port "/dev/ttyS2"
resolution 100
range_res 10
delay 60
)
driver
(
name "vfh"
provides ["position2d:1"]
requires ["position2d:0" "laser:0"]
#safety_dist 0.1
distance_epsilon 0.5
angle_epsilon 10
)
driver
(
name "amcl"
provides ["position2d:2" "localize:0"]
requires ["odometry:::position2d:0" "laser:0" "laser:::map:0"]
)
driver
(
name "mapfile"
provides ["map:0"]
filename "map.pgm"
resolution 0.0857
)
#driver
#(
# name "mapcspace"
# requires ["map:0"]
# provides ["map:1"]
# robot_shape "circle"
# robot_radius 0.20
#)
driver
(
name "wavefront"
provides ["planner:0"]
requires ["output:::position2d:1" "input:::position2d:2" "map:0"]
safety_dist 0.15
distance_epsilon 0.01
angle_epsilon 5
)
######################################
And here is the java-client code (mixed with Radu's code)
/** Creates a new instance of PlannerTest */
public PlannerTest(int port)
{
try {
robot = new PlayerClient ("lasseter", port);
loci = robot.requestInterfaceLocalize (0,
PlayerConstants.PLAYER_OPEN_MODE);
plni = robot.requestInterfacePlanner (0,
PlayerConstants.PLAYER_OPEN_MODE);
} catch (PlayerException e) {
System.err.println ("Javaclient test: > Error connecting to
Player: ");
System.err.println (" [ " + e.toString() + " ]");
System.exit (1);
}
}
public static void main(String[] args)
{
try
{
PlannerTest planner = new PlannerTest(6665);
try{Thread.sleep(5000);}catch(Exception e){;}
shutdown.setPC( PlannerTest.robot );
// --[ Test Localize/Planner
// initial values for the covariance matrix (c&p example from Player)
//double cov[] = {
// 250,
// 250,
// (Math.PI / 6.0) * (Math.PI / 6.0) * 180 / Math.PI * 3600 *
180
// / Math.PI * 3600 };
double cov[] = {1,1,1}; // why does this work better than the matrix
above?
// set the initial guessed pose for localization (AMCL)
PlayerLocalizeSetPose plsp = new PlayerLocalizeSetPose ();
// set the mean values to 0,0,0
plsp.setMean (new PlayerPose ());
plsp.setCov (cov);
loci.setPose (plsp);
while( true )
{
//get cmd line input
String cmd = getInput("Enter a coord: x.xx y.yy");
if( cmd.equals("quit") ) break;
// set a new goal in the planner
String[] coord = cmd.split(" ");
PlayerPose goal = new PlayerPose ();
goal.setPx ( Float.parseFloat(coord[0]) );
goal.setPy ( Float.parseFloat(coord[1]) );
goal.setPa (0);
plni.setGoal (goal);
// --]
}
}catch(Exception e){ e.printStackTrace(); }
}
Any help would be great.
Thanks
--
View this message in context: http://www.nabble.com/Planner-tf4396457.html#a12536805
Sent from the java-player-users mailing list archive at Nabble.com.
|