Ask Your Question

srkp's profile - activity

2021-02-03 13:44:11 -0500 received badge  Famous Question (source)
2020-10-12 02:57:34 -0500 marked best answer How to start a ROS image_raw subscriber python code in boot up

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 dt_ros_usb_recording.sh[30768]: 2020-10-05 20:38:37 [DT] Ros CAM USB recording script is starting أكت 05 20:38:37 atc8110 dt_ros_usb_recording.sh[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 dt_ros_usb_recording.sh[30768]: /home/atc8110/dt/services/record/usb/dt_ros_usb_recording.sh: line 15: 30814 Segmentation fault (core dumped) /usr/bin/python3 /home/atc8110/dt/services/record/usb/dt_ros_usb_recording.py

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

How to fix this ??

2020-10-12 02:51:02 -0500 answered a question How to start a ROS image_raw subscriber python code in boot up

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

2020-10-12 02:49:15 -0500 received badge  Notable Question (source)
2020-10-07 11:31:43 -0500 received badge  Popular Question (source)
2020-10-06 00:37:46 -0500 received badge  Enthusiast
2020-10-05 18:42:49 -0500 asked a question How to start a ROS image_raw subscriber python code in boot up

How to start a ROS image_raw subscriber python code in boot up I am a using ROS Noetic in ubuntu 20.04. I am creating an