Rosnode runs with root access but not as a normal user

asked 2018-05-09 03:52:43 -0500

rahul_b gravatar image

updated 2018-05-09 04:44:37 -0500

Hi, I am using ROS Kinetic with a Nvidia TX2 board. I have a rosnode performing detection using faster rcnn framework on a camera feed. When I run it as a normal user using the command:

rosrun os_node os_cv_core 0 0 0 0 0 0 0 1 10 0

it throws the following error:

frcnn() running ...

F0509 07:02:15.048138  3700 syncedmem.hpp:22] Check failed: error == cudaSuccess (30 vs. 0)  unknown error

*** Check failure stack trace: ***

    @       0x7fa8789718  google::LogMessage::Fail()
    @       0x7fa878b614  google::LogMessage::SendToLog()
    @       0x7fa8789290  google::LogMessage::Flush()
    @       0x7fa878beb4  google::LogMessageFatal::~LogMessageFatal()
    @       0x7fb1aff5fc  caffe::SyncedMemory::mutable_cpu_data()
    @       0x7fb19886a4  caffe::Blob<>::Reshape()
    @       0x7fb1988ce4  caffe::Blob<>::Reshape()
    @       0x7fb1a6eaf4  caffe::InputLayer<>::LayerSetUp()
    @       0x7fb1b65d28  caffe::Net<>::Init()
    @       0x7fb1b67f24  caffe::Net<>::Net()
    @       0x7fb1b6b6dc  FRCNN_API::Detector::Set_Model()
    @           0x4b7614  FRCNN_API::Detector::Detector()
    @           0x4b4318  main
    @       0x7fb0dd28a0  __libc_start_main


Aborted (core dumped)

However, the node runs fine if I run it after entering root mode. How do I run this command as a regular user (using sudo does not work, I get the error saying sudo: rosrun: command not found)?

Edit: I asked the same question on Nvidia forums earlier but the solution posted there hasn't worked.

Thanks.

edit retag flag offensive close merge delete

Comments

This appears to be a cross-post of How to solve CudaSuccess (30 vs. 0) error? on the NVidia forums. Could you please mention that in the future?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-09 04:07:12 -0500 )edit

Thanks for the tip. I edited the question.

rahul_b gravatar image rahul_b  ( 2018-05-09 04:44:45 -0500 )edit
1

Edit: I asked the same question on Nvidia forums earlier but the solution posted there hasn't worked.

Looking at your previous post it doesn't seem like it has reached a conclusion, so I would recommend to continue that thread over at the NVidia forums.

And from the description you provide ..

gvdhoorn gravatar image gvdhoorn  ( 2018-05-09 05:59:21 -0500 )edit
1

.. and some quick Googling this does not seem to be an issue caused by anything in ROS, but either a permission problem (on the needed device files) or something else with Caffe, CUDA or other NVidia infrastructure.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-09 06:00:03 -0500 )edit

Thanks for the input. I will continue the thread over at Nvidia forums.

rahul_b gravatar image rahul_b  ( 2018-05-09 06:20:01 -0500 )edit