Ask Your Question

How to start a ROS image_raw subscriber python code in boot up

asked 2020-10-05 11:42:43 -0500

srkp gravatar image

I am a using ROS Noetic in ubuntu 20.04. I am creating an application to read camera and save . i have two launch files to read camera and publish to ros, then I created two python codes to subscribe this two topics and save to file.

First two nodes with publishing is starting on bootup with two scripts and this script files are calling from systemctl. This scripts are working and i am getting images in image_view.

I created two new services, which are calling scripts to start my python code to save videos. But when i am starting this script file from systemctl, i am getting error:

أكت 05 20:38:37 atc8110[30768]: 2020-10-05 20:38:37 [DT] Ros CAM USB recording script is starting أكت 05 20:38:37 atc8110[30814]: Unable to init server: Could not connect: Connection refused أكت 05 20:38:37 atc8110 python3[30814]: cannot open display: أكت 05 20:38:37 atc8110[30768]: /home/atc8110/dt/services/record/usb/ line 15: 30814 Segmentation fault (core dumped) /usr/bin/python3 /home/atc8110/dt/services/record/usb/

but when i am running this /usr/bin/python3 /home/atc8110/dt/services/record/usb/ from terminal. It is working perfectly

How to fix this ??

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-10-12 02:51:02 -0500

srkp gravatar image

I fixed this issue. There was namenewwindow( ) function call in python code. I removed this function for service and issue fixed

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-10-05 11:42:43 -0500

Seen: 174 times

Last updated: Oct 12 '20