Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process will died in 1-2minutes #9

Open
Shame-fight opened this issue Oct 15, 2019 · 6 comments
Open

Process will died in 1-2minutes #9

Shame-fight opened this issue Oct 15, 2019 · 6 comments

Comments

@Shame-fight
Copy link

I have test this process in PC,it runs normally in begin,but it will be died after one to two minutes.I use the package of usb_cam,not the video_steam_ ,I do not know the reason.

@pushkalkatara
Copy link
Owner

Use the package video_stream_opencv to capture camera topic. It has better memory management and threading. you wont face the issue with video_stream_opencv

@Shame-fight
Copy link
Author

Use the package video_stream_opencv to capture camera topic. It has better memory management and threading. you wont face the issue with video_stream_opencv

thank you for your reply! I tried video_stream_opencv again, but it still doesn't work. The process is killed 1-2 seconds after the program starts running. I'm not sure if there is a problem with my parameter modification. Can you provide a detailed video_stream_opencv package in your code, and what needs to be modified? If you use the camera to get the video? Like topic or other parameters: My running steps are 1.roscore 2.roslaunch video_stream_opencv webcam.launch 3.roslaunch darknet_ros darknet_ros.launch Another problem is that the screen displayed on the screen in step two does not match the actual color, and all the screens are red. The error in step 3 is as follows:
[ INFO] [1573007124.574856264]: Published
[ INFO] [1573007124.575474778]: Published
[ INFO] [1573007124.576115010]: Published
[ INFO] [1573007124.576652618]: Started darknet thread
[ INFO] [1573007124.576671665]: Reference Count > 0
[ INFO] [1573007124.576759294]: Published
[ INFO] [1573007124.577155300]: Inside tracking
[ INFO] [1573007124.578420409]: Consumder Done
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[darknet_ros-1] process has died [pid 18102, exit code -6, cmd /home/jgx/catkin_darknet/devel/lib/darknet_ros/darknet_ros __name:=darknet_ros __log:=/home/jgx/.ros/log/866f238a-0039-11ea-b468-983f9f190824/darknet_ros-1.log].
log file: /home/jgx/.ros/log/866f238a-0039-11ea-b468-983f9f190824/darknet_ros-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

@pushkalkatara
Copy link
Owner

the error states what(): std::bad_alloc, i think it is due to the reason that you have less memory to load the model. What device are you using? Also, did you try running the alexeby repo alone on the same device?

@Shame-fight
Copy link
Author

the error states what(): std::bad_alloc, i think it is due to the reason that you have less memory to load the model. What device are you using? Also, did you try running the alexeby repo alone on the same device?

My graphics card is NVIDIA 1080, I have successfully run alexeby repo, and the leggedrobotics repo of darknet_ros, it use usb_cam package. But alexeby repo works better, so I want to use it under ros. I believe that my equipment is completely ok, I suspect that some parameters I have not modified correctly, so I hope to have a detailed step: including which parameters need to be modified, each step of the operation. This way I might know where my mistake is.

@pushkalkatara
Copy link
Owner

For the package video_stream_opencv, your device id should match with the one listed in launch file, for camera mounted at /dev/video0, the video_stream_provider param is 0. After launching the package, you can also test the image feed using image_view.

I just noticed you are using darknet_ros.launch file, instead try running with yolo_v3.launch

@Shame-fight
Copy link
Author

For the package video_stream_opencv, your device id should match with the one listed in launch file, for camera mounted at /dev/video0, the video_stream_provider param is 0. After launching the package, you can also test the image feed using image_view.

I just noticed you are using darknet_ros.launch file, instead try running with yolo_v3.launch

I know the error I made: the cfg file is incorrect, but when I modified the cfg file, I encountered a similar problem: the program crashes immediately when the camera detects the target, I found strange by printing the /darknet_ros/bounding_boxes topic. Phenomenon: The exact same coordinates will be printed many times. In the same seq, three identical coordinates, categories, and credibility are printed 45, 26, and 21 times respectively; and each seq is the same. That is, seq is also repeated, exactly the same. I suspect this is caused by the problem, leggedrobotics verision darknet_ros has the same problem, but has been resolved, the link is as follows leggedrobotics/darknet_ros#150
You can print the bounding_boxes topic and you can see what I am expressing. Looking forward to your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants