reiniscimurs / DRL-robot-navigation

Deep Reinforcement Learning for mobile robot navigation in ROS Gazebo simulator. Using Twin Delayed Deep Deterministic Policy Gradient (TD3) neural network, a robot learns to navigate to a random goal point in a simulated environment while avoiding obstacles.
MIT License
618 stars 122 forks source link

world issue #160

Open Seher-789 opened 3 months ago

Seher-789 commented 3 months ago

i have spawn my robot but the problem is that it spawn the robot in empty world even my robot is moving. Screenshot from 2024-08-09 17-10-59

Screenshot from 2024-08-09 17-10-49

reiniscimurs commented 3 months ago

Hi,

Please provide descriptive information of what the issue is that you are facing.

Seher-789 commented 3 months ago

Hi thank you for your response i want to spawn my robot(two differential robot) and i spawned the robot but it is spawned in empty world even i sourced it correctly and increase the sleep time Screenshot from 2024-08-09 18-29-04 but still i am facing the issue. this empty world issue i am facing when i spawned my robot Screenshot from 2024-08-09 18-19-10 Screenshot from 2024-08-09 17-10-59

reiniscimurs commented 3 months ago

You mean 2 different robots or a differential drive robot?

Please provide the code changes that you mage to spawn the robot and the full list of commands you execute to run the training.

Seher-789 commented 3 months ago

thank you for response i spawned my robot but i am facing this error and my robot is collide with obstacles. i made these changes and error i am encountering can you please guide me Screenshot from 2024-08-10 23-49-45

Screenshot from 2024-08-10 23-49-08 Screenshot from 2024-08-10 23-49-02 Screenshot from 2024-08-10 23-49-25

reiniscimurs commented 3 months ago

Your robot object is not named "chase_robot" so every time you try to reset you get an error regarding it.

Since you have changed the robot model but still are calling the pioneer3dx.gazebo.launch I assume you have changes made in that file. That is where i would look for the problem.

Seher-789 commented 3 months ago

i made the changes in pioneer3dx.gazebo.launch but i am facing this error Screenshot from 2024-08-11 16-39-53

Seher-789 commented 3 months ago

one more question my robot name is chase_robot so the model should i keep it as chase_robot or r1?

reiniscimurs commented 3 months ago

So your issue is that robots name is different from what you think it is in gazebo. When you call reset with "chase_robot" there is no such element so it is not reset. It does not matter if the name is "chase_robot" or "r1", the gazebo should spawn it with the right name, and that is not happening here.

My guess is that spawner still takes the default value in the pioneer3dx.gazebo.launch file that you have set to "robot_second" and that is how the robot model is named in gazebo. You should check what the name of your robot is in gazebo after it has been spawned. Alternatively, you can replace the default "robot_second" with "chase_robot" and see if that works.

Seher-789 commented 3 months ago

hi thank you for help, i spawned my robot and my robot is collide with obstacles but collision rate is zero 0.000 can you help me in this Screenshot from 2024-08-13 21-51-33 Screenshot from 2024-08-13 21-51-25

reiniscimurs commented 3 months ago

It is hard for me to understand what the issue is here. When do these collisions happen and how do they happen? Do they happen in validation stage or during training?

Please try to understand the code first and asking specific questions providing all the information as it is very difficult to help with general questions without descriptions.

Seher-789 commented 3 months ago

its happened during training and i changed the seed value as well

reiniscimurs commented 3 months ago

Please read through the code and try to understand what the collision rate measures