RobotnikIstobalAI2 / rb_theron_sim

0 stars 0 forks source link

Error in robot localization #4

Open EmimaJiva opened 7 months ago

EmimaJiva commented 7 months ago

@ggari-robotnik @sandra-Robotnik The docker image rb-theron-gazebo-noetic-0.1.0 uploaded in the repository dockerhub has been used. When the robots move, they lose their location, as can be seen in the following image.

Captura de pantalla de 2024-02-15 09-30-47

sandra-Robotnik commented 7 months ago

@EmimaJiva, Is the problem when they move and/or when they stay idle for some time? Can you please record a video?

EmimaJiva commented 7 months ago

@ggari-robotnik @sandra-Robotnik The problem is both if they move and if they don't move. Once they are lost, they are no longer well located.

https://github.com/RobotnikIstobalAI2/rb_theron_sim/assets/121794419/b1d9fdc9-8fcc-4e4a-a66a-ee7231ddc13f

sandra-Robotnik commented 7 months ago

@EmimaJiva , Our experts require that you provide us with a video of the moment when the robots get lost so that they can analyze it. Can you record a video which shows this?

sandra-Robotnik commented 7 months ago

@EmimaJiva , and can you record a rosbag of the moment when the robots get lost?

EmimaJiva commented 7 months ago

@sandra-Robotnik The file of the recording is large and I cannot upload it here, I will send it to you by upv exchange.

EmimaJiva commented 7 months ago

@sandra-Robotnik Sorry, I sent you a bad file. Now I send you the good one.

The moment when the robot is lost is not always the same, sometimes it is lost early, sometimes it takes longer to get lost. But it always ends up getting lost.

EmimaJiva commented 7 months ago

@sandra-Robotnik Did you receive the correct file?

ggari-robotnik commented 7 months ago

@EmimaJiva we just sent you a Google drive link, were you can place the rosbag there. We have problems with microsoft platforms. You should have received a notification email on your account

EmimaJiva commented 7 months ago

@ggari-robotnik @sandra-Robotnik I have added another video and the rosbag in the Drive.

sandra-Robotnik commented 7 months ago

@EmimaJiva Our experts suspect that it could be related to a physical drift that it is pretty common on some robots in Gazebo. This drift can happen with the robot moving or idle.

For our experts it would be easier to check what is happening by seeing the simulation. So, I will send you an email to arrange a meeting.

EmimaJiva commented 7 months ago

@sandra-Robotnik Okay

EmimaJiva commented 7 months ago

@ggari-robotnik @sandra-Robotnik As your expert told me, I try to test different commits from the rb_theron_common repository of RobotnikAutomation. For this I modify the rb_theron_sim.repos file and put the commit as you can see in the figure. change commit But when I build the new image, I get the following error: error change commit Can you tell me how to fix it? I will try to fix it but if you have the answer it would be faster.

ggari-robotnik commented 7 months ago

Try changing this here: rb_theron_sim.repos.yaml

  src/rb_theron_common:
    type: git
    # url: https://github.com/RobotnikAutomation/rb_theron_common
    url: https://github.com/RobotnikIstobalAI2/rb_theron_common.git
    version: noetic-devel

or with explicit commit:

  src/rb_theron_common:
    type: git
    # url: https://github.com/RobotnikAutomation/rb_theron_common
    url: https://github.com/RobotnikIstobalAI2/rb_theron_common.git
    version: e45f9884f6f0c6eb61063f3741c154d2fd9b7eee
EmimaJiva commented 7 months ago

@ggari-robotnik @sandra-Robotnik Trying it as you say, with an explicit commit and I get the same error. rb_theron_navigation_private does not exist in that commit, it is a folder that you have created.

ggari-robotnik commented 7 months ago

I'm puzzled, I'm looking on this repo on that commit and I see the folder rb_theron_navigation_private. Quite strange

@EmimaJiva Can you check that in the docker building process is taking the right commit and the folder where is downloaded has not changed?

To do that, add an ls command of rb_theron_common just before the catkin ignore and build it with the following directive in order to see better what it happening:

BUILDKIT_PROGRESS=plain docker compose build
EmimaJiva commented 7 months ago

@ggari-robotnik @sandra-Robotnik The rb_theron_common commit I am trying to test is 1e080cf1ea8f0f724f3371d265cd4ec4ebc38d30. I don't see the rb_theron_navigation_complete folder anywhere. Docker downloads ok that commit but it doesn't find that folder. Can you send me the link to where the folder is in that commit, please?

ggari-robotnik commented 7 months ago

@EmimaJiva can you try this commit e45f9884f6f0c6eb61063f3741c154d2fd9b7eee for rb_theron_common?

EmimaJiva commented 7 months ago

@ggari-robotnik I try this commit and when I launch it I obtained this error: commit

EmimaJiva commented 7 months ago

@ggari-robotnik @sandra-Robotnik In case the information helps you. The robot usually gets lost when it turns on itself and makes abrupt changes of orientation.

sandra-Robotnik commented 6 months ago

@EmimaJiva , Our experts have identified the origin of the problem in the simulation. It lies in the fact that the robot wheels are not actually stationary; instead, they are in constant motion. To solve it, it is necessary to add one parameter (one for each wheel) in the launch that spawns the model of the robot (rb_theron_robot.launch).

They will resolve it. However, the steps they will follow are as follows:

  1. Add in the rb_theron_sim repository inside the repos folder in repos.yaml the RobotnikAutomation/gazebo_ros_pkgs repository. image
  1. Add the missing parameter (one for each wheel) in rb_theron_robot.launch located within rb_theron_sim > rb_theron_gazebo > launch before the (currently line 41). image
  1. Configure the proper name of the parameter and select its value as position instead of velocity which is its default name.
    • As this parameter is a rosparam, it is possible to do a rosparam list to check its name
    • The name would be something like this: robot_namespace + "/gazebo_ros_control/pid_gains/" + joint_names_[j] + "/close_loop"
sandra-Robotnik commented 6 months ago

@EmimaJiva , I merged in rb_theron_sim in the branch noetic-devel the required changes to solve the wheels of the robot. Please, try the simulation using the noetic-devel branch to check that works fine. If the issue is solve, I will close this issue.

EmimaJiva commented 6 months ago

@ggari-robotnik @sandra-Robotnik I have tested the updated simulation and it works fine. There are some times that it gets a little lost (attached image) but it recovers its location without problem.

Image

There is also an error related to the camera when launching with open-rmf-deployment (attached image), but it does not seem to affect the performance of the simulation.

Image