dusty-nv / jetson-reinforcement

Deep reinforcement learning GPU libraries for NVIDIA Jetson TX1/TX2 with PyTorch, OpenAI Gym, and Gazebo robotics simulator.
MIT License
880 stars 224 forks source link

Error running the Gazebo Arm example #24

Closed shivangg closed 6 years ago

shivangg commented 6 years ago

CMake and make run fine. But on running ./gazebo-arm.sh, the arm in Gazebo just keeps falling loosely(as in the GIF).

image

I'm running this on Nvidia 940MX on Ubuntu 16.04.

ArmPlugin::ArmPlugin()
ArmPlugin::Load('arm')
PropPlugin::Load('tube')
[deepRL]  use_cuda:       True
[deepRL]  use_lstm:       1
[deepRL]  lstm_size:      512
[deepRL]  input_width:    64
[deepRL]  input_height:   64
[deepRL]  input_channels: 3
[deepRL]  num_actions:    4
[deepRL]  optimizer:      RMSprop
[deepRL]  learning rate:  1.5
[deepRL]  replay_memory:  10000
[deepRL]  batch_size:     2
[deepRL]  gamma:          0.9
[deepRL]  epsilon_start:  0.9
[deepRL]  epsilon_end:    0.05
[deepRL]  epsilon_decay:  200.0
[deepRL]  allow_random:   1
[deepRL]  debug_mode:     1
[deepRL]  creating DQN model instance
[deepRL]  DRQN::__init__()
[deepRL]  LSTM (hx, cx) size = 512
[deepRL]  DQN model instance created
[deepRL]  DQN script done init
[cuda]  cudaAllocMapped 49152 bytes, CPU 0x203960000 GPU 0x203960000
[deepRL]  pyTorch THCState  0x40AA9C00
[cuda]  cudaAllocMapped 12288 bytes, CPU 0x203a60000 GPU 0x203a60000
ArmPlugin - allocated camera img buffer 64x64  24 bpp  12288 bytes
episode frame = 1
[cuda]   cudaGetLastError()
[cuda]      no kernel image is available for execution on the device (error 48) (hex 0x30)
[cuda]      /home/shivangg/projects/catkin_ws/src/RoboND-DeepRL-Project/cuda/cudaPlanar.cu:53
[cuda]   cudaPackedToPlanarBGR((uchar3*)inputBuffer[1], inputRawWidth, inputRawHeight, inputState->gpuPtr, 64, 64)
[cuda]      no kernel image is available for execution on the device (error 48) (hex 0x30)
[cuda]      /home/shivangg/projects/catkin_ws/src/RoboND-DeepRL-Project/gazebo/ArmPlugin.cpp:322
ArmPlugin - failed to convert 64x64 image to 64x64 planar BGR image
dokeash commented 6 years ago

Try changing "-gencode arch " value in cmakelist specific to your GPU.

shivangg commented 6 years ago

It didn't work when I added the flag as listed here for the Maxwell architecture 940 MX. So, I went ahead and added most of the flags to see if it works. Now, It works. Thanks. Takes a lot of time to build, so not trying to find which one did the trick.

    -gencode arch=compute_50,code=sm_50
    -gencode arch=compute_52,code=sm_52
    -gencode=arch=compute_52,code=compute_52
    -gencode arch=compute_53,code=sm_53
    -gencode arch=compute_60,code=sm_60
    -gencode arch=compute_61,code=sm_61
    -gencode arch=compute_62,code=sm_62
    -gencode=arch=compute_61,code=compute_61
    -gencode arch=compute_70,code=sm_70