Skip to content

New AutoParking_v2 betatesting #1944

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

Closed
pariaspe opened this issue Feb 21, 2023 · 37 comments
Closed

New AutoParking_v2 betatesting #1944

pariaspe opened this issue Feb 21, 2023 · 37 comments

Comments

@pariaspe
Copy link
Collaborator

No description provided.

@GauravKumar9920
Copy link
Contributor

GauravKumar9920 commented Feb 22, 2023

How do I set it up manually ?
We are talking about autoparking_v2 right...
can you provide some more details

@GauravKumar9920
Copy link
Contributor

In beta testing I can setup the Gazebo world and spawn, but the web server and docker side of the part how do I build it @pariaspe

@GauravKumar9920
Copy link
Contributor

Also in the current autoparking excersise which is present in the RADI the world and the models aren't spawning.

@pariaspe
Copy link
Collaborator Author

Hi, follow the existing instructions. Everything is supposed to spawn inside the RADI. If models are not spawning in gazebo your environment variables may not be set (or wrong set). Check in GAZEBO_MODEL_PATH and GAZEBO_RESOURCE_PATH variables if you can see models and worlds paths.

@GauravKumar9920
Copy link
Contributor

GauravKumar9920 commented Feb 24, 2023

hey @pariaspe , actually I spotted a bug in the Autoparking exercise, the models weren't spawnign in that and I have fixed it. shall I create an issue for the same as the issues is persistent in the og repo ?
Also, just to be sure are we supposed to be working with autoparking_v2 If yes can you guide me to build the same so that it reflects in the locally build docker image as an excersise.

@GauravKumar9920
Copy link
Contributor

Hey @pariaspe any comments 😅

@pariaspe
Copy link
Collaborator Author

Hey @GauravKumar9920 , please avoid to ping me twice, I'll answer your questions asap.

I don't spot any bug, since the models are spawning correctly. Anyway, what is your suggestion?

Screenshot 2023-02-26 at 13-24-11 RoboticsAcademy

You need to add autoparking_v2 exercise to the exercises database. It is explained in the documentation. You need to build a new RADI first, because the latest doesn't contain the exercise

@GauravKumar9920
Copy link
Contributor

Okkay I will make sure of that.

Actually I checked the following by running the latest RADI, it doesn't has that problem that I mentioned above of not being able to spawn the bot into the arena.
but for the same the code in the latest RADI was different
the code I found on the RoboticsAcademy/scripts/.env by running the latest RADI was -

#!/bin/bash export GAZEBO_RESOURCE_PATH=$GAZEBO_RESOURCE_PATH:/usr/share/gazebo-11:/RoboticsAcademy/exercises/follow_line/web-template/launch/:/RoboticsAcademy/exercises/obstacle_avoidance/web-template/launch/:/RoboticsAcademy/exercises/vacuum_cleaner/web-template/launch/:/RoboticsAcademy/exercises/vacuum_cleaner_loc/web-template/launch/:/RoboticsAcademy/exercises/3d_reconstruction/web-template/launch/:/RoboticsAcademy/exercises/global_navigation/web-template/launch/:/RoboticsAcademy/exercises/car_junction/web-template/:/RoboticsAcademy/exercises/opticalflow_teleop/web-template/launch/:/RoboticsAcademy/exercises/autoparking/web-template/:/RoboticsAcademy/exercises/montecarlo_visual_loc/web-template/launch/

whereas it's diffrent in the Repo.
can you guide me to what branch the RADI:latest is using, cause in the docker-file the branch specified is master.

Also, the issue I mentioned previously still occurs when I build the docker image locally using ./build.sh
So for that, the changes I made to the same for it to work was correcting the path by adding /launch after /web-template in the line.

I have demonstrated it here....

I am a bit confused so kindly help me out with it
Anyways I am working to add the autoparking_v2 excersise to the RADI locally after testing I will update you of the same.

PS: I guess the topic has diverted to the autoparking instead of autoparking_v2 exercise so Shall I create a new discussion or shall we continue it here..

@pariaspe
Copy link
Collaborator Author

Hey, you are completely right. /launch is missing after /web-template. Thanks for noticing. Could you open a patch solving it?

RADI:latest should always use master branch.

PS: my bad, I'm renaming this issue 👍

@pariaspe pariaspe changed the title New AutoParking betatesting New AutoParking_v2 betatesting Feb 28, 2023
@GauravKumar9920
Copy link
Contributor

well sure but then why the RADI:latest has a diffrent code ?

@pariaspe
Copy link
Collaborator Author

Because master branch has evolved since we released that RADI.
I've just uploaded a new RADIv3.3.0 (also new latest). You can work from that stating point and go on

@GauravKumar9920
Copy link
Contributor

Hey I have added the exercise, yet I am facing a bit of issues can you help me out with them...
av2

weberror

@ango1994
Copy link
Contributor

ango1994 commented Mar 2, 2023

HI @GauravKumar9920. The steps to create a new exercise are the following:

  1. Add the exercise to the database wich you already have done.
  2. Create a folder in exercises/static/exercises with the exercise inside. The name of the folder has to be the same of the exercise id you gave in the database.
  3. Create a folder in exercises/templates/exercises with a exercise.html inside. The name of the folder also has to be the same of the exercise id.

@GauravKumar9920
Copy link
Contributor

I have cross-checked all the above mentioned points but the errors still occur.
These are all the files I have changed(compared to the master branch) you can have a look at them..
Also, This is the testing branch Where I am testing all the changes I made.
The errors that occurred -
(one is after opening the exercise )-
d1
one after running (python3.8 manage.py runserver) -
d2

also the files mentioned in the above response -

  1. done
  2. check 2
  3. check 3

@pariaspe
Copy link
Collaborator Author

pariaspe commented Mar 4, 2023

Hi @GauravKumar9920 , I've just tested to see what's happening. I faced the same problem. How are adding the exercise to the database? By default, configuration is set as a string while it should be a json. Try, to replace "{}" with {}.

Screenshot 2023-03-04 at 11-03-21 Add exercise Django site admin

I've also found another bug in instruction.json file. Paths for Autoparking_v2 exercise are wrong, they are skipping static/exercises/ subdirectories. Compare them with old autoparking paths and you will notice easily.

    "autoparking": {
        "gazebo_path": "/RoboticsAcademy/exercises/static/exercises/autoparking/web-template/launch",
        "instructions_ros": ["/opt/ros/noetic/bin/roslaunch ./RoboticsAcademy/exercises/static/exercises/autoparking/web-template/launch/autoparking.launch"],
        "instructions_host": "python3 /RoboticsAcademy/exercises/static/exercises/autoparking/web-template/exercise.py 0.0.0.0"
    },
    "autoparking_v2": {
        "gazebo_path": "/RoboticsAcademy/exercises/autoparking_v2/web-template/launch",
        "instructions_ros": ["/opt/ros/noetic/bin/roslaunch ./RoboticsAcademy/exercises/autoparking_v2/web-template/launch/autoparking.launch"],
        "instructions_host": "python3 /RoboticsAcademy/exercises/autoparking_v2/web-template/exercise.py 0.0.0.0"
    },

@GauravKumar9920
Copy link
Contributor

Thanks @pariaspe !
I will fix the path.
also I will try replacing the same )

@GauravKumar9920
Copy link
Contributor

Hey @pariaspe ,
I have made all the changes but the final one i.e replacing "{}" with {} in configuration can't be done because if I run python3.8 manage.py runserver the error shown above still occurs. I am not sure how to resolve that.
previously the same command was working when I added the exercise but I am not sure to what's happening and why is it giving me errors.

@pariaspe
Copy link
Collaborator Author

pariaspe commented Mar 6, 2023

Hey, I've fixed that on #1962 , so if you build RADI from master again, and you add the exercise as always it should work,

@GauravKumar9920
Copy link
Contributor

Hey, I've fixed that on #1962 , so if you build RADI from master again, and you add the exercise as always it should work,

I checked the same twice once by implementing the changes onto the branch I was testing changes on, and second by cloning the branch where the changes were made
It isn't working :,)

@pariaspe
Copy link
Collaborator Author

pariaspe commented Mar 8, 2023

It should work. @ango1994 tested this morning and merged the branch. Could you try again?

@GauravKumar9920
Copy link
Contributor

Hey @pariaspe I have sucessuflly added the exercise and made the required changes for it to run.
However we I have spotted a bug in the exercise-
auto1
The world isn't spawning correctly, shall we work out over here or a new issue ?

@pariaspe
Copy link
Collaborator Author

pariaspe commented Mar 9, 2023

Nice, good work! Let's keep talking here since we are debugging it. Have you checked the GAZEBO_MODEL_PATH env var?

@GauravKumar9920
Copy link
Contributor

Hey, thanks !
I am working on it.

@GauravKumar9920
Copy link
Contributor

GauravKumar9920 commented Mar 16, 2023

Hey @pariaspe @jmplaza , Actually I have my college exams going on, I will solve the issue by next week.

@GauravKumar9920
Copy link
Contributor

hey @pariaspe I am getting this error after running -
docker run --rm -it -p 8000:8000 -p 2303:2303 -p 1905:1905 -p 8765:8765 -p 6080:6080 -p 1108:1108 jderobot/robotics-academy:testing

ue1

@ango1994
Copy link
Contributor

Hi @GauravKumar9920 you need to rebuild the base image since there have been changes in the dependencies. "./build.sh -f test"

@GauravKumar9920
Copy link
Contributor

GauravKumar9920 commented Mar 18, 2023

kindly check the PR, I have fixed the world not being able to spawn issue.

@pariaspe
Copy link
Collaborator Author

pariaspe commented Mar 19, 2023

Thanks @GauravKumar9920 , I've merged #1965. I'm able to spawn the world file correctly. I'm able to move the car too.
However, connection closes after a couple of minutes of running the code. Also, JS map viewer is not working while the laser scan seems to be working on gazebo.

@GauravKumar9920
Copy link
Contributor

Okkayy, I will look into it.

@GauravKumar9920
Copy link
Contributor

hey @pariaspe , can you provide me with the code to regenerate the bug.

@pariaspe
Copy link
Collaborator Author

hey @pariaspe , can you provide me with the code to regenerate the bug.

I'm building the RADI, launching the exercises and slowly moving the car (HAL.setV(0.1)).

@GauravKumar9920
Copy link
Contributor

Hey @pariaspe , I ran the bot for a few minutes and also restarted the same a few times the connection seems to be fine and didn't get disconnected.

@GauravKumar9920
Copy link
Contributor

About the

Thanks @GauravKumar9920 , I've merged #1965. I'm able to spawn the world file correctly. I'm able to move the car too. However, connection closes after a couple of minutes of running the code. Also, JS map viewer is not working while the laser scan seems to be working on gazebo.

about js map viewer issue can you elaborate.
ps: I am done with exams, I can contribute actively.....

@Amglega
Copy link
Collaborator

Amglega commented Mar 26, 2023

I changed the topic in the gui.py to "/catvehicle/front_laser_points" and the map shows the front laser at first but it does not get updated properly when the car starts moving:

Screenshot from 2023-03-26 11-54-45

@pariaspe
Copy link
Collaborator Author

Also:

[ERROR] [1681641691.426710159, 0.001000000]: No p gain specified for pid.  Namespace: /catvehicle/gazebo_ros_control/pid_gains/back_right_wheel_joint
[ERROR] [1681641691.427244038, 0.001000000]: No p gain specified for pid.  Namespace: /catvehicle/gazebo_ros_control/pid_gains/back_left_wheel_joint
[ERROR] [1681641691.427773326, 0.001000000]: No p gain specified for pid.  Namespace: /catvehicle/gazebo_ros_control/pid_gains/front_left_steering_joint
[ERROR] [1681641691.428007313, 0.001000000]: No p gain specified for pid.  Namespace: /catvehicle/gazebo_ros_control/pid_gains/front_right_steering_joint

@GauravKumar9920
Copy link
Contributor

I will try fixing it..

@ango1994 ango1994 self-assigned this Jun 8, 2023
@ango1994
Copy link
Contributor

Closed on #2134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants