-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Superthin templates] Fix GUI widget in follow line exercise #2464
Comments
Hi Pawan, I have downloaded the 4.5.6.beta development version and started it on my end and the overlay is not displayed as well. I am current taking a look at both the files and I will first create a separate react component that displays the camera image (I will try to find an alternative as well just in case this does not work) and conduct unit + integration testing after. Thank you! |
Hi @JovanYap Thanks for taking a look. To see it being overlayed you can take a look into Also run the RADI with --debug flag to open a terminal, run the script ./entrypoint.sh to start robotics academy and ./kill_all.sh to kill all the processes. |
Hi @pawanw17 Thanks for the information! I see that the overlay is present but not updating on version 4.4.31 but it is not present for 4.5.6beta. I am currently taking a look at ws_gui.js code that is related to follow the line exercise since it updates the map overlay and the position of the car. Are you referring to the REST API code for the backend part and may I ask where can I view the code or changelog for the 4.5.6beta and 4.4.31 versions? Thank you! |
Thank you so much for the information! I am currently working on finding the source of the bug. |
Hi @pawanw17, I did some testing and noticed that it is indeed a backend issue because the Also, I noticed the file in super(Exercise, self).__init__(exercise_command=f"{current_path}/../../python_template/ros2_humble/exercise.py 0.0.0.0",
gui_command=f"{current_path}/../../python_template/ros2_humble/gui.py 0.0.0.0 {circuit}",
update_callback=update_callback) Kindly advise on the current issue if you have any insights on the migration from ros1 to ros2. Thank you so much! |
Hi @JovanYap I took a look at the lap, map, v, w values and they seem to be static I don't think this would be the reason the widget crashes For now we can ignore the entry_point/ros2_humble/exercise.py |
@pawanw17 The reason it was not rendering because the image is basically coming as empty "". |
@Apoorvgarg-creator even with the image the widget gets crashed.... The previous comment was intentionally made to have image as "" so lap and map can be seen better. |
-- Can you send me a few sample JSON for this where image data is present.
Since, we are using Flex Container now, the size of the circuit is not fixed, which is scaling the image ( circuit ). Yes, Since beginning (Correct me if I am wrong) I remember while migrating also, image data was null only. we will basically draw a red dot over the static image and use the position data coming from backend to move it on the map. @pawanw17 I have raised a draft PR, but working on the other circuit also, as now it is configured as world, earlier it was changed using a dropdown selector for circuit inside the visualization component only. |
@Apoorvgarg-creator If you run the code Then you should see the image data being populated. I can share the samples tomorrow |
Hi @Apoorvgarg-creator from GUI import GUI
from HAL import HAL
# Enter sequential code!
HAL.setV(2)
while True:
im = HAL.getImage()
GUI.showImage(im)
# Enter iterative code! Here is the sample json
|
@pawanw17 Please confirm if this json is sent when update state. |
@Apoorvgarg-creator I tried to go back to the old widget by updating this line RoboticsAcademy/exercises/templates/exercises/follow_line_newmanager/exercise.html Line 23 in 23ebd74
with {% react_component components/visualizers/UpdateView %}{% end_react_component %} And it seems the issue is intermittent now, the widget works most of the time but hangs abruptly sometimes or doesn't appear. |
@pawanw17 I will also check if there is some "why" for the stated behaviour |
@pawanw17 I ran the code sent by you. I put a debugger also, but I didn't get any data. |
@pawanw17 Check this, No data is coming from backend in image. ![]() ![]() |
The data is not going because your code is stuck probably because of a runtime error see the console in UI, there is some error in your online editor code If you scroll the console a bit then you'll see the real error |
The GUI Widget in the superthin version of the follow line exercise is broken, It is supposed to display a map overlayed on the camera images.
It works in master, but due to changes in superthin and movement from sharedVariables, the GUI just hangs up. The current workaround is to have a separate react component that only displays the camera images.
The files that likely need changes are
https://github.com/JdeRobot/RoboticsAcademy/blob/master/react_frontend/src/components/visualizers/UpdateView.js
https://github.com/JdeRobot/RoboticsAcademy/blob/master/react_frontend/src/libs/UpdateRenderer.js
the development can be started at the 4.5.6.beta RADI
docker pull jderobot/robotics-academy:4.5.6.beta
This is how it is supposed to look
![image](https://private-user-images.githubusercontent.com/40732709/317351095-5be7c388-3fc4-488c-865b-366eb51edf46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNDE5MzIsIm5iZiI6MTcyMTI0MTYzMiwicGF0aCI6Ii80MDczMjcwOS8zMTczNTEwOTUtNWJlN2MzODgtM2ZjNC00ODhjLTg2NWItMzY2ZWI1MWVkZjQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE4NDAzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI1ZTI1NGUxN2Q3OTFhZjJlMGE4ZTA5ODRiZjI5MTAwMGM4OTA5YWEyODhkNmZiMjZiOTI2MzczZDk2ODg4ZDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pOFnFuKDXUr_dKWr06o9ucFDf27IZq51rqkPT19tFh0)
The text was updated successfully, but these errors were encountered: