From 9e481703a1075b76757c086a66acb827b4d7ad98 Mon Sep 17 00:00:00 2001 From: "John M. Penn" Date: Mon, 22 Feb 2016 11:59:11 -0600 Subject: [PATCH] Move the Wheelbot models to the SIM_wheelbot directory --- .../Modified_data/cross.waypoints | 25 +++---- trick_sims/SIM_wheelbot/README.md | 2 +- trick_sims/SIM_wheelbot/RUN_test/input.py | 3 +- trick_sims/SIM_wheelbot/S_overrides.mk | 4 +- .../SIM_wheelbot/images/CompassRose.png | Bin 0 -> 5060 bytes .../SIM_wheelbot/models}/Battery/.gitignore | 0 .../models}/Battery/include/DCBattery.hh | 0 .../SIM_wheelbot/models}/Battery/makefile | 0 .../models}/Battery/src/DCBattery.cpp | 0 .../models}/Battery/test/DCBatteryTest.cpp | 0 .../models}/Battery/test/makefile | 0 .../include/differentialDriveController.hh | 0 .../Control/include/testMotorController.hh | 0 .../Control/include/vehicleController.hh | 0 .../SIM_wheelbot/models}/Control/makefile | 0 .../src/differentialDriveController.cpp | 0 .../models}/Control/src/vehicleController.cpp | 0 .../test/DifferentialDriveControllerTest.cpp | 0 .../Control/test/VehicleControllerTest.cpp | 0 .../models}/Control/test/makefile | 0 .../Electrical/include/ElectricalCircuit.hh | 0 .../SIM_wheelbot/models}/Electrical/makefile | 0 .../Electrical/src/ElectricalCircuit.cpp | 0 .../Electrical/test/ElectricalCircuitTest.cpp | 0 .../models}/Electrical/test/makefile | 0 .../SIM_wheelbot/models}/Graphics/Makefile | 0 .../models}/Graphics/src/trick/EVDisplay.java | 68 ++++++++++-------- .../models}/Guidance/include/arena.hh | 0 .../models}/Guidance/include/findpath.hh | 0 .../models}/Guidance/include/gridSquare.hh | 0 .../models}/Guidance/include/navigator.hh | 0 .../models}/Guidance/include/point.hh | 0 .../SIM_wheelbot/models}/Guidance/makefile | 0 .../models}/Guidance/src/arena.cpp | 0 .../models}/Guidance/src/findpath.cpp | 0 .../models}/Guidance/src/navigator.cpp | 0 .../models}/Guidance/test/ArenaTest.cpp | 0 .../models}/Guidance/test/FindPathTest.cpp | 0 .../models}/Guidance/test/NavigatorTest.cpp | 0 .../models}/Guidance/test/makefile | 0 .../models}/Motor/include/DCMotor.hh | 0 .../Motor/include/DCMotorSpeedController.hh | 0 .../models}/Motor/include/Motor.hh | 0 .../SIM_wheelbot/models}/Motor/include/PWM.hh | 0 .../models}/Motor/include/ServoMotor.hh | 0 .../Motor/include/ServoSpeedController.hh | 0 .../Motor/include/motorSpeedController.hh | 0 .../SIM_wheelbot/models}/Motor/makefile | 0 .../models}/Motor/src/DCMotor.cpp | 0 .../Motor/src/DCMotorSpeedController.cpp | 0 .../SIM_wheelbot/models}/Motor/src/Motor.cpp | 0 .../SIM_wheelbot/models}/Motor/src/PWM.cpp | 0 .../models}/Motor/src/ServoMotor.cpp | 0 .../Motor/src/ServoSpeedController.cpp | 0 .../models}/Motor/test/DCMotorTest.cpp | 0 .../models}/Motor/test/PWMTest.cpp | 0 .../SIM_wheelbot/models}/Motor/test/makefile | 0 .../test/DifferentialDriveControllerTest.cpp | 0 .../Motor/test/test/VehicleControllerTest.cpp | 0 .../models}/Motor/test/test/makefile | 0 .../models}/Vehicle/include/vehicleOne.hh | 0 .../SIM_wheelbot/models}/Vehicle/makefile | 0 .../models}/Vehicle/src/vehicleOne.cpp | 0 63 files changed, 56 insertions(+), 46 deletions(-) create mode 100644 trick_sims/SIM_wheelbot/images/CompassRose.png rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Battery/.gitignore (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Battery/include/DCBattery.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Battery/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Battery/src/DCBattery.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Battery/test/DCBatteryTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Battery/test/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/include/differentialDriveController.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/include/testMotorController.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/include/vehicleController.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/src/differentialDriveController.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/src/vehicleController.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/test/DifferentialDriveControllerTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/test/VehicleControllerTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Control/test/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Electrical/include/ElectricalCircuit.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Electrical/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Electrical/src/ElectricalCircuit.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Electrical/test/ElectricalCircuitTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Electrical/test/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Graphics/Makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Graphics/src/trick/EVDisplay.java (80%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/include/arena.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/include/findpath.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/include/gridSquare.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/include/navigator.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/include/point.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/src/arena.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/src/findpath.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/src/navigator.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/test/ArenaTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/test/FindPathTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/test/NavigatorTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Guidance/test/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/include/DCMotor.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/include/DCMotorSpeedController.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/include/Motor.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/include/PWM.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/include/ServoMotor.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/include/ServoSpeedController.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/include/motorSpeedController.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/src/DCMotor.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/src/DCMotorSpeedController.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/src/Motor.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/src/PWM.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/src/ServoMotor.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/src/ServoSpeedController.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/test/DCMotorTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/test/PWMTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/test/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/test/test/DifferentialDriveControllerTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/test/test/VehicleControllerTest.cpp (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Motor/test/test/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Vehicle/include/vehicleOne.hh (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Vehicle/makefile (100%) rename {trick_models/Wheelbot => trick_sims/SIM_wheelbot/models}/Vehicle/src/vehicleOne.cpp (100%) diff --git a/trick_sims/SIM_wheelbot/Modified_data/cross.waypoints b/trick_sims/SIM_wheelbot/Modified_data/cross.waypoints index 5fe919ac..2f2670f0 100644 --- a/trick_sims/SIM_wheelbot/Modified_data/cross.waypoints +++ b/trick_sims/SIM_wheelbot/Modified_data/cross.waypoints @@ -1,12 +1,13 @@ - 2, 0, 0,images/wp1.png - 2, 2, 0,images/wp2.png - 0, 2, 0,images/wp3.png - 0, 4, 0,images/wp4.png --2, 4, 0,images/wp5.png --2, 2, 0,images/wp6.png --4, 2, 0,images/wp7.png --4, 0, 0,images/wp8.png --2, 0, 0,images/wp9.png --2,-2, 0,images/wp10.png - 0,-2, 0,images/wp11.png - 0, 0, 0,images/wp0.png + 2.0, 0.0, 0.0,images/wp1.png + 2.0, 2.0, 0.0,images/wp2.png + 0.0, 2.0, 0.0,images/wp3.png + 0.0, 4.0, 0.0,images/wp4.png +-2.0, 4.0, 0.0,images/wp5.png +-2.0, 2.0, 0.0,images/wp6.png +-4.0, 2.0, 0.0,images/wp7.png +-4.0, 0.0, 0.0,images/wp8.png +-2.0, 0.0, 0.0,images/wp9.png +-2.0,-2.0, 0.0,images/wp10.png + 0.0,-2.0, 0.0,images/wp11.png + 0.0, 0.0, 0.0,images/wp0.png + 3.5,-3.5, 0.0,images/CompassRose.png diff --git a/trick_sims/SIM_wheelbot/README.md b/trick_sims/SIM_wheelbot/README.md index a54a0f9a..5e6a52d3 100644 --- a/trick_sims/SIM_wheelbot/README.md +++ b/trick_sims/SIM_wheelbot/README.md @@ -1,4 +1,4 @@ -#SIM\_rover +#SIM\_wheelbot --- This is a simulation of a two-wheeled robotic electric vehicle. diff --git a/trick_sims/SIM_wheelbot/RUN_test/input.py b/trick_sims/SIM_wheelbot/RUN_test/input.py index cf426ab9..b59b7f7b 100644 --- a/trick_sims/SIM_wheelbot/RUN_test/input.py +++ b/trick_sims/SIM_wheelbot/RUN_test/input.py @@ -30,8 +30,7 @@ for line in fp: # Start the display VarServer Client #========================================== varServerPort = trick.var_server_get_port(); -trick_home = os.environ['TRICK_HOME'] -EVDisplay_path = trick_home + "/trick_models/Wheelbot/Graphics/dist/EVDisplay.jar" +EVDisplay_path = "models/Graphics/dist/EVDisplay.jar" if (os.path.isfile(EVDisplay_path)) : EVDisplay_cmd = "java -jar " \ diff --git a/trick_sims/SIM_wheelbot/S_overrides.mk b/trick_sims/SIM_wheelbot/S_overrides.mk index 4acb9a1e..e1f6cccd 100644 --- a/trick_sims/SIM_wheelbot/S_overrides.mk +++ b/trick_sims/SIM_wheelbot/S_overrides.mk @@ -1,2 +1,2 @@ -TRICK_CFLAGS += -I${TRICK_HOME}/trick_models/Wheelbot -TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models/Wheelbot +TRICK_CFLAGS += -Imodels +TRICK_CXXFLAGS += -Imodels diff --git a/trick_sims/SIM_wheelbot/images/CompassRose.png b/trick_sims/SIM_wheelbot/images/CompassRose.png new file mode 100644 index 0000000000000000000000000000000000000000..fa49090150bd4f670fa1debfafb46106ab6b079b GIT binary patch literal 5060 zcmV;#6FcmQP)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bvM#Jr)z6J><&E22D|vq?Y?Vkbo_DijopiF$2PET#mZ8eu=y$(ArYkv7@Ex`GL?QCc!_*KFrd&;n1r7 zqW-CFs9&fT)ZaU5gc&=gBz-DaCw(vdOp0__x+47~U6sC(E(JNe@4cTT*n6*E zVH4eoU1-&7pEV~_PRe`a7v+@vy!^5}8?Y3)UmlaER000kLNklIV0!-<&b|MgIWu!+=Dg~qxslyu#KhY`reZN|nh@{ZOw zKpu(B6J~20AWtOnRu+y`Lk(fIDH})9C~?XXX%1YibxEV~SRv?GsZ+QybP}>=#scTx zzxung=cBg3X9N4&cDZxg-q{?O6D}r!q0YJ!z|w1qBgK>-ORaxE$2BY3#9O(Vx>|U9&NA3A{}t!dtG-@-2zHL@u2p_~P;4rg zOM&Am{?w?7gjGvp>4YV|XiO!Bv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r%0J3>dM0~dn=?N z^vRsrHO~Z9QBRW2DodLFOm#j_ z6!o_N)pbyYmFH5PfL2pHS1FRp*jR?@_&%!KeEzYxYwK@JXg&vAc^qp`wlp( z9{(3?S^cj2Tes^6odhGUy9kDl8zW^$OoGLJq{NB00^JPw3%Lf&I z4ZQ4^Gu_`Ah+oJgA&t}!HuD)-C<2c(FfciN%x%t-7v2%Tb#V7SXUdQpoaGPA4$K*V zSxRXmhb3?#C$<&vk8j`SG!`11<^``>B{Yvq+qmOl6dJRskdM|hI}g-%&iqT}Gi!*HxJggua-dpe6zSDW@>7}q~@oVmvU+v$v3ktP0_$$`o zTTf1c;;&oR#*4q7Y~sm}P0BSZP)aaKL5g2{=gj-wZ`@tsxmzDJwiDRMjUNM6|;xyg=l(S>whYo%N>h=w- z&Z4{j=#Hk5&u7?XI-KdlkU3Id$;*Ls-jZ4m(*G16&9lM>jcUxiKww>-Rq3>4)Lv5EjWqjzW zi^plyn6iSSl8VeR!q8Urt{{RZjZGeEu(kmh;dvmDVP(fWVYa>j7^!%)nOK{#Q4am* zxoQ9ko)V7Zx^EMv^HVOeoaeRy{6+f(Ve?rVLseXc&-Afs8X%0wFag8t{o`31$RE$P a>;D6P!v)yW_sq%w0000 featureList; - private double unitsPerPixel; + private double metersPerPixel; public ArenaMap(List flist, double mapScale) { featureList = flist; - unitsPerPixel = mapScale; + metersPerPixel = mapScale; SetScale(mapScale); } public void SetScale (double mapScale) { if (mapScale < 0.00001) { - unitsPerPixel = 0.00001; + metersPerPixel = 0.00001; } else { - unitsPerPixel = mapScale; + metersPerPixel = mapScale; } } @@ -79,20 +79,30 @@ class ArenaMap extends JPanel { int width = getWidth(); int height = getHeight(); - // Translate origin to the center of the panel. + // Translate map origin to the center of the panel. Graphics2D gCenter = (Graphics2D)g2d.create(); gCenter.translate(width/2, height/2); + //gCenter.scale(2.0, 2.0); // Makes pixels bigger. + for (int ii=0 ; ii < featureList.size() ; ++ii ) { + Feature feature = featureList.get(ii); - BufferedImage featureImage = feature.bufImage; - int ImgOffsetX = featureImage.getWidth()/2; - int ImgOffsetY = featureImage.getHeight()/2; - int drawLocationX = (int)(feature.x / unitsPerPixel) - ImgOffsetX; - int drawLocationY = (int)(feature.y / unitsPerPixel) - ImgOffsetY; - AffineTransform tx = AffineTransform.getRotateInstance(feature.heading, ImgOffsetX, ImgOffsetY); - AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR); - gCenter.drawImage(op.filter(featureImage, null), drawLocationX, drawLocationY, null); + + int featureX = (int) -(feature.west / metersPerPixel); + int featureY = (int) -(feature.north / metersPerPixel); + + double drawHeading = -feature.heading; + + int ImgOffsetX = feature.bufImage.getWidth()/2; + int ImgOffsetY = feature.bufImage.getHeight()/2; + + int drawLocationX = featureX - ImgOffsetX; + int drawLocationY = featureY - ImgOffsetY; + + AffineTransform tx = AffineTransform.getRotateInstance( drawHeading, ImgOffsetX, ImgOffsetY); + AffineTransformOp op = new AffineTransformOp( tx, AffineTransformOp.TYPE_BILINEAR); + gCenter.drawImage( op.filter( feature.bufImage, null), drawLocationX, drawLocationY, null); } gCenter.dispose(); } @@ -195,18 +205,18 @@ public class EVDisplay extends JFrame { String line; while ((line = br.readLine()) != null) { String field[] = line.split(","); - double X = Double.parseDouble(field[0]); - double Y = Double.parseDouble(field[1]); + double N = Double.parseDouble(field[0]); + double W = Double.parseDouble(field[1]); double H = Double.parseDouble(field[2]); String imageFileName = field[3]; - featureList.add(new Feature( X, Y, H, imageFileName)); + featureList.add(new Feature( N, W, H, imageFileName)); } } Feature vehicle = new Feature(0, 0, Math.toRadians(0), vehicleImageFile); featureList.add(vehicle); - EVDisplay evd = new EVDisplay( new ArenaMap( featureList, 0.015)); + EVDisplay evd = new EVDisplay( new ArenaMap( featureList, 0.01)); evd.setVisible(true); System.out.println("Connecting to: " + host + ":" + port); @@ -233,10 +243,10 @@ public class EVDisplay extends JFrame { String line; line = evd.in.readLine(); field = line.split("\t"); - double X = Double.parseDouble(field[1]); - double Y = Double.parseDouble(field[2]); - double H = Double.parseDouble(field[3]) + 1.570796325; - vehicle.setState(X,Y,H); + double N = Double.parseDouble( field[1] ); + double W = Double.parseDouble( field[2] ); + double H = Double.parseDouble( field[3] ); + vehicle.setState(N,W,H); } catch (IOException | NullPointerException e ) { go = false; diff --git a/trick_models/Wheelbot/Guidance/include/arena.hh b/trick_sims/SIM_wheelbot/models/Guidance/include/arena.hh similarity index 100% rename from trick_models/Wheelbot/Guidance/include/arena.hh rename to trick_sims/SIM_wheelbot/models/Guidance/include/arena.hh diff --git a/trick_models/Wheelbot/Guidance/include/findpath.hh b/trick_sims/SIM_wheelbot/models/Guidance/include/findpath.hh similarity index 100% rename from trick_models/Wheelbot/Guidance/include/findpath.hh rename to trick_sims/SIM_wheelbot/models/Guidance/include/findpath.hh diff --git a/trick_models/Wheelbot/Guidance/include/gridSquare.hh b/trick_sims/SIM_wheelbot/models/Guidance/include/gridSquare.hh similarity index 100% rename from trick_models/Wheelbot/Guidance/include/gridSquare.hh rename to trick_sims/SIM_wheelbot/models/Guidance/include/gridSquare.hh diff --git a/trick_models/Wheelbot/Guidance/include/navigator.hh b/trick_sims/SIM_wheelbot/models/Guidance/include/navigator.hh similarity index 100% rename from trick_models/Wheelbot/Guidance/include/navigator.hh rename to trick_sims/SIM_wheelbot/models/Guidance/include/navigator.hh diff --git a/trick_models/Wheelbot/Guidance/include/point.hh b/trick_sims/SIM_wheelbot/models/Guidance/include/point.hh similarity index 100% rename from trick_models/Wheelbot/Guidance/include/point.hh rename to trick_sims/SIM_wheelbot/models/Guidance/include/point.hh diff --git a/trick_models/Wheelbot/Guidance/makefile b/trick_sims/SIM_wheelbot/models/Guidance/makefile similarity index 100% rename from trick_models/Wheelbot/Guidance/makefile rename to trick_sims/SIM_wheelbot/models/Guidance/makefile diff --git a/trick_models/Wheelbot/Guidance/src/arena.cpp b/trick_sims/SIM_wheelbot/models/Guidance/src/arena.cpp similarity index 100% rename from trick_models/Wheelbot/Guidance/src/arena.cpp rename to trick_sims/SIM_wheelbot/models/Guidance/src/arena.cpp diff --git a/trick_models/Wheelbot/Guidance/src/findpath.cpp b/trick_sims/SIM_wheelbot/models/Guidance/src/findpath.cpp similarity index 100% rename from trick_models/Wheelbot/Guidance/src/findpath.cpp rename to trick_sims/SIM_wheelbot/models/Guidance/src/findpath.cpp diff --git a/trick_models/Wheelbot/Guidance/src/navigator.cpp b/trick_sims/SIM_wheelbot/models/Guidance/src/navigator.cpp similarity index 100% rename from trick_models/Wheelbot/Guidance/src/navigator.cpp rename to trick_sims/SIM_wheelbot/models/Guidance/src/navigator.cpp diff --git a/trick_models/Wheelbot/Guidance/test/ArenaTest.cpp b/trick_sims/SIM_wheelbot/models/Guidance/test/ArenaTest.cpp similarity index 100% rename from trick_models/Wheelbot/Guidance/test/ArenaTest.cpp rename to trick_sims/SIM_wheelbot/models/Guidance/test/ArenaTest.cpp diff --git a/trick_models/Wheelbot/Guidance/test/FindPathTest.cpp b/trick_sims/SIM_wheelbot/models/Guidance/test/FindPathTest.cpp similarity index 100% rename from trick_models/Wheelbot/Guidance/test/FindPathTest.cpp rename to trick_sims/SIM_wheelbot/models/Guidance/test/FindPathTest.cpp diff --git a/trick_models/Wheelbot/Guidance/test/NavigatorTest.cpp b/trick_sims/SIM_wheelbot/models/Guidance/test/NavigatorTest.cpp similarity index 100% rename from trick_models/Wheelbot/Guidance/test/NavigatorTest.cpp rename to trick_sims/SIM_wheelbot/models/Guidance/test/NavigatorTest.cpp diff --git a/trick_models/Wheelbot/Guidance/test/makefile b/trick_sims/SIM_wheelbot/models/Guidance/test/makefile similarity index 100% rename from trick_models/Wheelbot/Guidance/test/makefile rename to trick_sims/SIM_wheelbot/models/Guidance/test/makefile diff --git a/trick_models/Wheelbot/Motor/include/DCMotor.hh b/trick_sims/SIM_wheelbot/models/Motor/include/DCMotor.hh similarity index 100% rename from trick_models/Wheelbot/Motor/include/DCMotor.hh rename to trick_sims/SIM_wheelbot/models/Motor/include/DCMotor.hh diff --git a/trick_models/Wheelbot/Motor/include/DCMotorSpeedController.hh b/trick_sims/SIM_wheelbot/models/Motor/include/DCMotorSpeedController.hh similarity index 100% rename from trick_models/Wheelbot/Motor/include/DCMotorSpeedController.hh rename to trick_sims/SIM_wheelbot/models/Motor/include/DCMotorSpeedController.hh diff --git a/trick_models/Wheelbot/Motor/include/Motor.hh b/trick_sims/SIM_wheelbot/models/Motor/include/Motor.hh similarity index 100% rename from trick_models/Wheelbot/Motor/include/Motor.hh rename to trick_sims/SIM_wheelbot/models/Motor/include/Motor.hh diff --git a/trick_models/Wheelbot/Motor/include/PWM.hh b/trick_sims/SIM_wheelbot/models/Motor/include/PWM.hh similarity index 100% rename from trick_models/Wheelbot/Motor/include/PWM.hh rename to trick_sims/SIM_wheelbot/models/Motor/include/PWM.hh diff --git a/trick_models/Wheelbot/Motor/include/ServoMotor.hh b/trick_sims/SIM_wheelbot/models/Motor/include/ServoMotor.hh similarity index 100% rename from trick_models/Wheelbot/Motor/include/ServoMotor.hh rename to trick_sims/SIM_wheelbot/models/Motor/include/ServoMotor.hh diff --git a/trick_models/Wheelbot/Motor/include/ServoSpeedController.hh b/trick_sims/SIM_wheelbot/models/Motor/include/ServoSpeedController.hh similarity index 100% rename from trick_models/Wheelbot/Motor/include/ServoSpeedController.hh rename to trick_sims/SIM_wheelbot/models/Motor/include/ServoSpeedController.hh diff --git a/trick_models/Wheelbot/Motor/include/motorSpeedController.hh b/trick_sims/SIM_wheelbot/models/Motor/include/motorSpeedController.hh similarity index 100% rename from trick_models/Wheelbot/Motor/include/motorSpeedController.hh rename to trick_sims/SIM_wheelbot/models/Motor/include/motorSpeedController.hh diff --git a/trick_models/Wheelbot/Motor/makefile b/trick_sims/SIM_wheelbot/models/Motor/makefile similarity index 100% rename from trick_models/Wheelbot/Motor/makefile rename to trick_sims/SIM_wheelbot/models/Motor/makefile diff --git a/trick_models/Wheelbot/Motor/src/DCMotor.cpp b/trick_sims/SIM_wheelbot/models/Motor/src/DCMotor.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/src/DCMotor.cpp rename to trick_sims/SIM_wheelbot/models/Motor/src/DCMotor.cpp diff --git a/trick_models/Wheelbot/Motor/src/DCMotorSpeedController.cpp b/trick_sims/SIM_wheelbot/models/Motor/src/DCMotorSpeedController.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/src/DCMotorSpeedController.cpp rename to trick_sims/SIM_wheelbot/models/Motor/src/DCMotorSpeedController.cpp diff --git a/trick_models/Wheelbot/Motor/src/Motor.cpp b/trick_sims/SIM_wheelbot/models/Motor/src/Motor.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/src/Motor.cpp rename to trick_sims/SIM_wheelbot/models/Motor/src/Motor.cpp diff --git a/trick_models/Wheelbot/Motor/src/PWM.cpp b/trick_sims/SIM_wheelbot/models/Motor/src/PWM.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/src/PWM.cpp rename to trick_sims/SIM_wheelbot/models/Motor/src/PWM.cpp diff --git a/trick_models/Wheelbot/Motor/src/ServoMotor.cpp b/trick_sims/SIM_wheelbot/models/Motor/src/ServoMotor.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/src/ServoMotor.cpp rename to trick_sims/SIM_wheelbot/models/Motor/src/ServoMotor.cpp diff --git a/trick_models/Wheelbot/Motor/src/ServoSpeedController.cpp b/trick_sims/SIM_wheelbot/models/Motor/src/ServoSpeedController.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/src/ServoSpeedController.cpp rename to trick_sims/SIM_wheelbot/models/Motor/src/ServoSpeedController.cpp diff --git a/trick_models/Wheelbot/Motor/test/DCMotorTest.cpp b/trick_sims/SIM_wheelbot/models/Motor/test/DCMotorTest.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/test/DCMotorTest.cpp rename to trick_sims/SIM_wheelbot/models/Motor/test/DCMotorTest.cpp diff --git a/trick_models/Wheelbot/Motor/test/PWMTest.cpp b/trick_sims/SIM_wheelbot/models/Motor/test/PWMTest.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/test/PWMTest.cpp rename to trick_sims/SIM_wheelbot/models/Motor/test/PWMTest.cpp diff --git a/trick_models/Wheelbot/Motor/test/makefile b/trick_sims/SIM_wheelbot/models/Motor/test/makefile similarity index 100% rename from trick_models/Wheelbot/Motor/test/makefile rename to trick_sims/SIM_wheelbot/models/Motor/test/makefile diff --git a/trick_models/Wheelbot/Motor/test/test/DifferentialDriveControllerTest.cpp b/trick_sims/SIM_wheelbot/models/Motor/test/test/DifferentialDriveControllerTest.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/test/test/DifferentialDriveControllerTest.cpp rename to trick_sims/SIM_wheelbot/models/Motor/test/test/DifferentialDriveControllerTest.cpp diff --git a/trick_models/Wheelbot/Motor/test/test/VehicleControllerTest.cpp b/trick_sims/SIM_wheelbot/models/Motor/test/test/VehicleControllerTest.cpp similarity index 100% rename from trick_models/Wheelbot/Motor/test/test/VehicleControllerTest.cpp rename to trick_sims/SIM_wheelbot/models/Motor/test/test/VehicleControllerTest.cpp diff --git a/trick_models/Wheelbot/Motor/test/test/makefile b/trick_sims/SIM_wheelbot/models/Motor/test/test/makefile similarity index 100% rename from trick_models/Wheelbot/Motor/test/test/makefile rename to trick_sims/SIM_wheelbot/models/Motor/test/test/makefile diff --git a/trick_models/Wheelbot/Vehicle/include/vehicleOne.hh b/trick_sims/SIM_wheelbot/models/Vehicle/include/vehicleOne.hh similarity index 100% rename from trick_models/Wheelbot/Vehicle/include/vehicleOne.hh rename to trick_sims/SIM_wheelbot/models/Vehicle/include/vehicleOne.hh diff --git a/trick_models/Wheelbot/Vehicle/makefile b/trick_sims/SIM_wheelbot/models/Vehicle/makefile similarity index 100% rename from trick_models/Wheelbot/Vehicle/makefile rename to trick_sims/SIM_wheelbot/models/Vehicle/makefile diff --git a/trick_models/Wheelbot/Vehicle/src/vehicleOne.cpp b/trick_sims/SIM_wheelbot/models/Vehicle/src/vehicleOne.cpp similarity index 100% rename from trick_models/Wheelbot/Vehicle/src/vehicleOne.cpp rename to trick_sims/SIM_wheelbot/models/Vehicle/src/vehicleOne.cpp