intel / ros_object_analytics

Apache License 2.0
181 stars 58 forks source link

Movidius analytics launch doesn't publish all topics #37

Closed fiorano10 closed 6 years ago

fiorano10 commented 6 years ago

I'm running a single movidius with a D435 on Ubuntu 16.04 i7-5550U (2-core), 8GB RAM, when I run the analytics_opencl_caffe.launch, it publishes all the topics

/object_analytics/detection /object_analytics/localization /object_analytics/pointcloud /object_analytics/rgb /object_analytics/segmentation /object_analytics/tracking

But when I launch analytics_movidius_ncs.launch, I get some of the topics being published, after rerunning the launch file multiple times, I get all the topics published. Do I need to add more NCS? Or could it be something else?

Peter9606 commented 6 years ago

I have seen that issue many times, you should re-plug in the ncs device and re-launch object analytics again.

fiorano10 commented 6 years ago

Okay, but is there a fix coming? Or is there a workaround? Hardware reset maybe?

Peter9606 commented 6 years ago

Next time see the issue, please paste the log out, so I can figure out which issue it is.

fiorano10 commented 6 years ago

There is no printed issue, it just doesn't publish some of the topics. I saw the rqt_console, there is nothing published in ROS_INFO/WARN/ERROR either.

Peter9606 commented 6 years ago

It might be a different issue, can you reproduce it by launch ros movidius ncs only?

fiorano10 commented 6 years ago

I just launch realsense_ros_camera rs_rgbd.launch and analytics_movidius_ncs.launch Also, If I launch just launchanalytics_movidius_ncs.launch, even then it publishes some topics one time, and other topics other times, and after a few runs, it publishes all of them.

Peter9606 commented 6 years ago

If I launch just launchanalytics_movidius_ncs.launch, even then it publishes some topics one time, and other topics other times, and after a few runs, it publishes all of them.

A little confused about this. Let me put it this way:

  1. Can you reproduce this using ros_opencl_caffe as backend ?
  2. Do you see the same problem when only launch "ros_movidis_ncs" package following this part
fiorano10 commented 6 years ago
  1. If I use ros_opencl_caffe as backend, then no. It publishes all the topics everytime.
  2. I will test this tomorrow afternoon, and update you @Peter9606 UPDATE: I was able to run roslaunch movidius_ncs_launch ncs_camera.launch cnn_type:=inception_v3 camera:=realsense roslaunch movidius_ncs_launch ncs_stream_classification_example.launch camera_topic:="/camera/color/image_raw" And it did publish the topic /movidius_ncs/classified_objects
Peter9606 commented 6 years ago

@fiorano10 , truly sorry, I gave you a wrong link which is pointing to classification rather than detection. would you please do it again using "mobilenetssd" described in "Detection for Video"

fiorano10 commented 6 years ago

@Peter9606 , I tried running just the detection, and it published the topics /classified_objects, and /detected_objects, but there were no msgs being published on the topic. Also the image viewer doesn't open.

Peter9606 commented 6 years ago

Can you log an issue under ros_intel_movidius_ncs project?

fiorano10 commented 6 years ago

@Peter9606
After updating the movidius_ncs package, the object_analytics_detection publishes messages to the topic but it doesn't publish the other topics, such as localization, tracking, and segmentation.

Peter9606 commented 6 years ago

Can you give me a snapshot of rqt_graph?

fiorano10 commented 6 years ago

Here you go rqt_graph(img) and rqt_graph(svg) It's not publishing /object_analytics/tracking

fiorano10 commented 6 years ago

@Peter9606 Also, I’m running 2 Movidius, what should be the running frequency for Detection, Tracking, and Localization?

Peter9606 commented 6 years ago

@fiorano10 Movidius only accelerates the performance of detection. Currently detection and localization(actually it's segmentation) are the bottle neck of the overall performance, ant they are at the same FPS. Increasing Movidius can improve the performance of detection & tracking but doesn't help localization(segmentation) at all.

fiorano10 commented 6 years ago

@Peter9606 Right now running the object_analytics launch doesn't seem to care about the no. of Movidius, and runs at about 6-7 FPS. But at rare instances, the detection runs @20 FPS, tracking @10 FPS, and the localization @~6-7 FPS. Does it make sense?

Peter9606 commented 6 years ago

I don't know much about multiple NCS supporting of Movidius, you should check with its current developer .

But at rare instances, the detection runs @20 FPS, tracking @10 FPS, and the localization @~6-7 FPS. Does it make sense?

Yes, it does make sense. One thing I should point out, is that current bottleneck - segmentation needs higher CPU computation, so if with more powerful CPU, you can slightly improve the localization to about 8~9 FPS.

fiorano10 commented 6 years ago

Would the i7-6770HQ remove that bottleneck? Or do I need a Xtreme edition or maybe even a Xeon?

Peter9606 commented 6 years ago

Per my understanding, the PointCloudLibrary which is used to segment point cloud doesn't lie on multi-cpu or multi-core, so as long as the CPU clock rate approaches, the result won't change too much. It isn't official record, but I got pretty same FPS using Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz as Intel(R) Xeon(R) CPU E3-1275 v5 @3.60GHz recorded in readme.

fiorano10 commented 6 years ago

@Peter9606 Any update on the topics not being published issue? The results in the readme are based on using 1 Movidius, right?

Peter9606 commented 6 years ago

The results in the readme are based on using 1 Movidius, right?

Correct.

Any update on the topics not being published issue?

I think ros_movidius_ncs maintainer is working on this.

fiorano10 commented 6 years ago

@Peter9606 When I run the movidius_ncs_detection with 2 Movidius NCS it runs at 20HZ. But when I launch the analytics_movidius_ncs.launch in Object Analytics, it runs at 10HZ irrespective of the no. of NCS connected.

Peter9606 commented 6 years ago

@fiorano10 , do you mind to log another issue about that, so we can focus on one topic per thread.

Peter9606 commented 6 years ago

@fiorano10 do you still see the issues described in this thread ?

fiorano10 commented 6 years ago

Not anymore, thanks @Peter9606 👍