Use "pose change" instead of "velocities" for (dxy_mm, dtheta_degrees, dt_seconds)
This commit is contained in:
@@ -35,7 +35,7 @@ import edu.wlu.cs.levy.breezyslam.components.Map;
|
||||
import edu.wlu.cs.levy.breezyslam.components.Scan;
|
||||
import edu.wlu.cs.levy.breezyslam.components.Position;
|
||||
import edu.wlu.cs.levy.breezyslam.components.URG04LX;
|
||||
import edu.wlu.cs.levy.breezyslam.components.Velocities;
|
||||
import edu.wlu.cs.levy.breezyslam.components.PoseChange;
|
||||
|
||||
import edu.wlu.cs.levy.breezyslam.robots.WheeledRobot;
|
||||
|
||||
@@ -226,8 +226,8 @@ public class Log2PGM
|
||||
if (this.use_odometry)
|
||||
{
|
||||
long [] odometry = odometries.elementAt(scanno);
|
||||
Velocities velocities = this.robot.computeVelocities(odometry[0], odometry[1], odometry[2]);
|
||||
slam.update(scan, velocities);
|
||||
PoseChange poseChange = this.robot.computePoseChange(odometry[0], odometry[1], odometry[2]);
|
||||
slam.update(scan, poseChange);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -45,9 +45,9 @@ classdef MinesRover < WheeledRobot
|
||||
|
||||
end
|
||||
|
||||
function [velocities, obj] = computeVelocities(obj, odometry)
|
||||
function [poseChange, obj] = computePoseChange(obj, odometry)
|
||||
|
||||
[velocities, obj] = computeVelocities@WheeledRobot(obj, odometry(1), odometry(2), odometry(3));
|
||||
[poseChange, obj] = computePoseChange@WheeledRobot(obj, odometry(1), odometry(2), odometry(3));
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ using namespace std;
|
||||
#include "Position.hpp"
|
||||
#include "Laser.hpp"
|
||||
#include "WheeledRobot.hpp"
|
||||
#include "Velocities.hpp"
|
||||
#include "PoseChange.hpp"
|
||||
#include "algorithms.hpp"
|
||||
|
||||
|
||||
@@ -161,9 +161,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
Velocities computeVelocities(long * odometry, Velocities & velocities)
|
||||
PoseChange computePoseChange(long * odometry, PoseChange & poseChange)
|
||||
{
|
||||
return WheeledRobot::computeVelocities(
|
||||
return WheeledRobot::computePoseChange(
|
||||
odometry[0],
|
||||
odometry[1],
|
||||
odometry[2]);
|
||||
@@ -350,8 +350,8 @@ int main( int argc, const char** argv )
|
||||
// Update with/out odometry
|
||||
if (use_odometry)
|
||||
{
|
||||
Velocities velocities = robot.computeVelocities(odometries[scanno], velocities);
|
||||
slam->update(lidar, velocities);
|
||||
PoseChange poseChange = robot.computePoseChange(odometries[scanno], poseChange);
|
||||
slam->update(lidar, poseChange);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -94,8 +94,8 @@ def main():
|
||||
|
||||
if use_odometry:
|
||||
|
||||
# Convert odometry to velocities
|
||||
velocities = robot.computeVelocities(odometries[scanno])
|
||||
# Convert odometry to pose change (dxy_mm, dtheta_degrees, dt_seconds)
|
||||
velocities = robot.computePoseChange(odometries[scanno])
|
||||
|
||||
# Update SLAM with lidar and velocities
|
||||
slam.update(lidars[scanno], velocities)
|
||||
|
||||
@@ -77,7 +77,7 @@ def main():
|
||||
if use_odometry:
|
||||
|
||||
# Convert odometry to velocities
|
||||
velocities = robot.computeVelocities(odometries[scanno])
|
||||
velocities = robot.computePoseChange(odometries[scanno])
|
||||
|
||||
# Update SLAM with lidar and velocities
|
||||
slam.update(lidars[scanno], velocities)
|
||||
|
||||
@@ -96,7 +96,7 @@ def main():
|
||||
if use_odometry:
|
||||
|
||||
# Convert odometry to velocities
|
||||
velocities = robot.computeVelocities(odometries[scanno])
|
||||
velocities = robot.computePoseChange(odometries[scanno])
|
||||
|
||||
# Update SLAM with lidar and velocities
|
||||
slam.update(lidars[scanno], velocities)
|
||||
|
||||
@@ -82,7 +82,7 @@ for scanno = 1:size(scans, 1)
|
||||
if use_odometry
|
||||
|
||||
% Convert odometry to velocities
|
||||
[velocities,robot] = robot.computeVelocities(odometries(scanno, :));
|
||||
[velocities,robot] = robot.computePoseChange(odometries(scanno, :));
|
||||
|
||||
% Update SLAM with lidar and velocities
|
||||
slam = slam.update(scans(scanno,:), velocities);
|
||||
|
||||
@@ -67,7 +67,7 @@ def threadfunc(robot, slam, timestamps, lidars, odometries, mapbytes, pose):
|
||||
else:
|
||||
|
||||
# Convert odometry to velocities
|
||||
velocities = robot.computeVelocities(odometries[scanno])
|
||||
velocities = robot.computePoseChange(odometries[scanno])
|
||||
|
||||
# Update SLAM with lidar and velocities
|
||||
slam.update(lidars[scanno], velocities)
|
||||
|
||||
@@ -99,9 +99,9 @@ class Rover(WheeledVehicle):
|
||||
|
||||
return '<%s ticks_per_cycle=%d>' % (WheeledVehicle.__str__(self), self.ticks_per_cycle)
|
||||
|
||||
def computeVelocities(self, odometry):
|
||||
def computePoseChange(self, odometry):
|
||||
|
||||
return WheeledVehicle.computeVelocities(self, odometry[0], odometry[1], odometry[2])
|
||||
return WheeledVehicle.computePoseChange(self, odometry[0], odometry[1], odometry[2])
|
||||
|
||||
def extractOdometry(self, timestamp, leftWheel, rightWheel):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user