From 62d39b971a73b275f8925eda22afc96ae73fd02d Mon Sep 17 00:00:00 2001 From: Javier Izquierdo Hernandez Date: Tue, 10 Sep 2024 19:38:12 +0200 Subject: [PATCH 1/5] Adding scalings --- .../helpers/showCarPositionFollowLine.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/exercises/static/exercises/follow_line_newmanager/react-components/helpers/showCarPositionFollowLine.js b/exercises/static/exercises/follow_line_newmanager/react-components/helpers/showCarPositionFollowLine.js index 25ff89ad0..403d2c35d 100644 --- a/exercises/static/exercises/follow_line_newmanager/react-components/helpers/showCarPositionFollowLine.js +++ b/exercises/static/exercises/follow_line_newmanager/react-components/helpers/showCarPositionFollowLine.js @@ -1,12 +1,19 @@ export const getCarPose = (circuit, position) => { var scaleX, scaleY, offsetX, offsetY; + let ackUniverse = circuit.includes("ack") + let ackMultiplier = 1; let pose = position.substring( 1, position.length - 1); let pos = pose.split(",").map(function (item) { return parseFloat(item); }); + if (ackUniverse) { + circuit = circuit.replace(" ack","") + ackMultiplier = 3 + } + switch (circuit) { - case "simple": + case "default": scaleY = 1.25; offsetY = 77 scaleX = -2.6; offsetX = 151 break; @@ -19,7 +26,7 @@ export const getCarPose = (circuit, position) => { scaleY = 0.685; offsetY = 77 scaleX = -0.48; offsetX = 151 break; - case "nürburgring": + case "ngb": scaleY = 1.5; offsetY = 77 scaleX = -1.495; offsetX = 151 break; @@ -29,8 +36,8 @@ export const getCarPose = (circuit, position) => { break; } - var x = Math.round(pos[0]) * scaleX + offsetX; - var y = Math.round(pos[1]) * scaleY + offsetY; + var x = Math.round(pos[0]) * scaleX / ackMultiplier + offsetX; + var y = Math.round(pos[1]) * scaleY / ackMultiplier + offsetY; return [x,y]; }; \ No newline at end of file From ed1a5e6112b788a1cfa0eabcaa0c9db8068cfefc Mon Sep 17 00:00:00 2001 From: Javier Izquierdo Hernandez Date: Tue, 10 Sep 2024 19:50:42 +0200 Subject: [PATCH 2/5] Adding switch for ackermann --- .../react-components/SpecificFollowLine.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/exercises/static/exercises/follow_line_newmanager/react-components/SpecificFollowLine.js b/exercises/static/exercises/follow_line_newmanager/react-components/SpecificFollowLine.js index 23520c38a..7f8a8bddf 100644 --- a/exercises/static/exercises/follow_line_newmanager/react-components/SpecificFollowLine.js +++ b/exercises/static/exercises/follow_line_newmanager/react-components/SpecificFollowLine.js @@ -67,7 +67,7 @@ const SpecificFollowLine = (props) => { setLapTime(null) switch (context.mapSelected) { case "follow_line_default_ros2": - circuitName = "simple"; + circuitName = "default"; setCircuitImg(defaultCircuit); break; case "follow_line_montmelo_ros2": @@ -79,7 +79,23 @@ const SpecificFollowLine = (props) => { setCircuitImg(montrealCircuit); break; case "follow_line_nurburgring_ros2": - circuitName = "nürburgring"; + circuitName = "ngb"; + setCircuitImg(ngbCircuit); + break; + case "follow_line_default_ack_ros2": + circuitName = "default ack"; + setCircuitImg(defaultCircuit); + break; + case "follow_line_montmelo_ack_ros2": + circuitName = "montmelo ack"; + setCircuitImg(montmeloCircuit); + break; + case "follow_line_montreal_ack_ros2": + circuitName = "montreal ack"; + setCircuitImg(montrealCircuit); + break; + case "follow_line_nurburgring_ack_ros2": + circuitName = "ngb ack"; setCircuitImg(ngbCircuit); break; } From 9ed94bf10ad9abe7a2421d0670277241f4cd10e8 Mon Sep 17 00:00:00 2001 From: Javier Izquierdo Hernandez Date: Tue, 10 Sep 2024 20:04:55 +0200 Subject: [PATCH 3/5] Updating db --- db.sqlite3 | Bin 327680 -> 327680 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 0059c859321a99f4a030765ba2b2d6b8823c3aaf..766679d89563ff952fce4d0b1f9b61b1e3e72511 100644 GIT binary patch delta 1755 zcmah~TWl0n7@j$2cF#;ZyQe@4waj+AOHCH&PUq6uo!P|Db}c2nV7WAfD&01v7us!y zU1&@2!L4j!42HC+dY<*MF;FRS5{!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+8YiYh}%Xindvy+J#}Q@(8g9h{SV>v{lvX5 F{RcL5uWtYV delta 520 zcmW-dOK1~O7=>r?KKWR<25tdE#ueWXZM}&z;WHM>xOF)9omv4 zuP9!A7#A(1=askS}k@gE6R( z=Zx;kpBheRU1qgCIly1-$rqO)O&v}bNC#n^i=@~%YPA*aa8frQ>MwBGA|~O~J+fC-lw%|f4`4}rIAQfXj{eYU~mx6i|)=t)zpN?6i;cuf7PK2tZe*IGe) zsGYza?Hj&FkG`$e^mja2f<{ni=h%-M5aQEixCdZhj?oE72)7?uZW`XeS-Q=r3kjZa z;Q^uqD17HW7;)V|Tf#+L!g;)aHjgZT4+Rrv_6n?d{Nj=Ut~TKh3eu5q9oKLL zr_kY%7W5yGG3I=Mx)`2h^y~lO4D!ieFq7xnuJRja^V(cfd7|VM7mkxvMqA3DxbYU@ otDB0gMS@V2f>#5!KT7w#E&ZeRQl0V4D|g}G%`EWZcja;PAAS0t-v9sr From ceddccd6692dfd50247b6ced902f7ed68be00a85 Mon Sep 17 00:00:00 2001 From: Javier Izquierdo Hernandez Date: Tue, 10 Sep 2024 20:19:51 +0200 Subject: [PATCH 4/5] Removing simple ackermann --- db.sqlite3 | Bin 327680 -> 327680 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 766679d89563ff952fce4d0b1f9b61b1e3e72511..5f4c6b8b6d08456e46572c321bce6dd5da33ffbd 100644 GIT binary patch delta 316 zcmZo@5NT)-nIO%`JWX<~aTKIDN+Lar#Wl8kn8fjkdFIU=n9y0y5+_ zF$uA8OYw6sFff2H!*gnl810S&fOmYqO%k zQ$ALRYOVduw*-Ky;~Dr*^B?8k&tJ}8$e+!h${#;n>H zOxVu;fH{~SD8c~5+Y{b1FA3mc=G()--_0+^w+E xfu*jYfr6oh6%ZMl>lqlBSXh`(FVtpMpPmrS!pmILVm!UipG9K3p+C#{4FLARO{)L^ delta 254 zcmZo@5NT)-nIO%`G*QNxk!fSXUp+?S<~aTKIDN+Lar#Wl8kil~Ew{68U=nBAuCR$o zh;?EB=XT5OOs6H7RX8=avtMA+X4-CYiRm5N!~l-%8aJ8lOkK6r_?4zhY+zQ~tZ49vkAt0s5u{vc zyVic@TLM7!kqrE&`H%AN=P&0k|$<&Wo&oGx(ztX`6zjg=XwTxojzedeV=TcftK uKVS}qhyu+>c+b2ffP;x&jDf$KUkqpg7e8}Ri}Cb6e-?@DhW;$)Hvj;AWkW9j From 649bc18f160f4e31938304d0880210c4ec0b5356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20del=20=C3=81guila?= Date: Thu, 12 Sep 2024 13:45:40 +0200 Subject: [PATCH 5/5] Revert "Removing simple ackermann" This reverts commit ceddccd6692dfd50247b6ced902f7ed68be00a85. --- db.sqlite3 | Bin 327680 -> 327680 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 5f4c6b8b6d08456e46572c321bce6dd5da33ffbd..766679d89563ff952fce4d0b1f9b61b1e3e72511 100644 GIT binary patch delta 254 zcmZo@5NT)-nIO%`G*QNxk!fSXUp+?S<~aTKIDN+Lar#Wl8kil~Ew{68U=nBAuCR$o zh;?EB=XT5OOs6H7RX8=avtMA+X4-CYiRm5N!~l-%8aJ8lOkK6r_?4zhY+zQ~tZ49vkAt0s5u{vc zyVic@TLM7!kqrE&`H%AN=P&0k|$<&Wo&oGx(ztX`6zjg=XwTxojzedeV=TcftK uKVS}qhyu+>c+b2ffP;x&jDf$KUkqpg7e8}Ri}Cb6e-?@DhW;$)Hvj;AWkW9j delta 316 zcmZo@5NT)-nIO%`JWX<~aTKIDN+Lar#Wl8kn8fjkdFIU=n9y0y5+_ zF$uA8OYw6sFff2H!*gnl810S&fOmYqO%k zQ$ALRYOVduw*-Ky;~Dr*^B?8k&tJ}8$e+!h${#;n>H zOxVu;fH{~SD8c~5+Y{b1FA3mc=G()--_0+^w+E xfu*jYfr6oh6%ZMl>lqlBSXh`(FVtpMpPmrS!pmILVm!UipG9K3p+C#{4FLARO{)L^