Closed LihanChen2004 closed 8 months ago
I have found the reason for the matrix multiplication error.
In order to adapt to real turbobots, I set REAL_N_SCAN_SAMPLES changed from 40 to 360 in setting.py
.
Then resulting in matrix multiplication error:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x364 and 44x512)
Similarly, set REAL_N_SCAN_SAMPLES to 180, an error is reported:
RuntimeError: mat1 and mat2 shapes cannot be multiplexed (1x184 and 44x512)
May I know how to modify the training model from 44 x 512 to 364 × 512 ?
I have basically solved the problem through #2 .
The number of scan samples you use in simulation (NUM_SCAN_SAMPLES
) should be equal to the number of scan samples you want to provide through the real world lidar (REAL_N_SCAN_SAMPLES
). I have added a note for this in commit 6a4a948ea3524ce304aef08c94fb5fd4178119d1.
Problem:
When attempting to run the example code in real turtlebot within a Docker container, I encountered the error: mat1 and mat2 shapes cannot be multiplied
My run steps
I run
ros2 launch turtlebot3_bringup robot.launch.py
on the turtlebot onboard computer to publish imu, odom, etc., when I use the sample model ddpg_0_stage9 in the warehouse or my own trained model.run
ros2 run turtlebot3_drl real_environment
,ros2 run turtlebot3_drl real_agent ddpg ddpg_1_stage_4 100
on another computer on the LAN.Prompt me
So I publish the target by
./spawn_goal.sh 1 1
. Then the second node reported an errorEnvironment:
Host OS: [Ubuntu20.04] Docker version: [24.0.5] Host Cuda: [11.6]
I would like to know if other people have had similar problems. What is causing this problem? What needs to be done? I would appreciate it very much if I could get it.