ailabspace / drl-based-mapless-crowd-navigation-with-perceived-risk

Deep Reinforcement Learning Based Crowd Navigation with Perceived Risk of the Moving Crowd for Mobile Robots
54 stars 7 forks source link

Python #3

Open GXJll opened 1 year ago

GXJll commented 1 year ago

HI,How to ues in python3 , i have failed used in python3 . because ImportError: dynamic module does not define module export function (PyInit__tf2),can you tell me,thanks.

SAMAKSH10 commented 1 year ago

If possible can you show me the picture of the error

GXJll commented 1 year ago

Thanks,i have used Quaternion to replace tf2,which can solve the issue.but i found in start_td3_training.py , your network_input is 363 dim . but in env agent's state dim is 400, so it will cause a mistake.The error is as follows: index 2 - got [400, 256] but expected shape compatible with [365, 256].how can i to solve it ? i rewrite network_input to 398,the agent will keep spinning in circles. can you tell me? thanks!!

2734359061 commented 7 months ago

Hello, I encountered the same issue as you did. I also changed the 'network_input' to 398, but the training took a long time and the robot kept spinning in place. Did you manage to solve it later?

zerosansan commented 5 months ago

Hi @GXJll @2734359061. That solved the input shape mismatch issues.

Just for reference, the 398 shape input size is based on the following: 359 Laser scan distances (m) + 2 goal distance and heading (m, radian) + 2 robot position x, y (m) + 1 robot orientation theta (radian) + 2 robot velocities x, y (m/s, m/s) + K nearest obstacle information positions x and y, velocities x and y (m, m, m/s, m/s)

In this case, the default script sets the K = 8 so the robot will take the nearest top eight obstacle information (8 x 4 = 32) into its network during training. That totals up to 398.

As for the training, the model should start converging before episode 300 according to my tests. With K = 8, This was the original training results using the same set of codes, settings and training environment.

kun1224 commented 3 months ago

Hi @GXJll @2734359061. That solved the input shape mismatch issues.

Just for reference, the 398 shape input size is based on the following: 359 Laser scan distances (m) + 2 goal distance and heading (m, radian) + 2 robot position x, y (m) + 1 robot orientation theta (radian) + 2 robot velocities x, y (m/s, m/s) + K nearest obstacle information positions x and y, velocities x and y (m, m, m/s, m/s)

In this case, the default script sets the K = 8 so the robot will take the nearest top eight obstacle information (8 x 4 = 32) into its network during training. That totals up to 398.

As for the training, the model should start converging before episode 300 according to my tests. With K = 8, This was the original training results using the same set of codes, settings and training environment.

so,why in start_td3_training Line 63: network_inputs = 363,it is different from Line 88 : network_inputs = 370 + (4 * k_obstacle_count - 4)