dji-sdk / Guidance-SDK-ROS

The official ROS package of Guidance SDK for 32/64 bit Ubuntu and XU3
80 stars 87 forks source link

Publishing topics for all 5 cameras #41

Open parlange opened 6 years ago

parlange commented 6 years ago

Hello, I have been trying to modify GuidanceNode.cpp in order to have a different topic for every camera. I noticed there's a pull request with a modified node FullCameras.cpp, which I tested, but I am getting the following error:

FullCameras.cpp:75:25: error: no match for ‘operator=’ (operand types are ‘cv::Mat’ and ‘char*’)
         images[j].image = data->m_greyscale_image_left[i];

Has anyone figured out how to split the node to publish 5 separate topics? Thanks.

jimcha21 commented 6 years ago

The FullCameras.cpp works just fine (as I double checked it right now).. Have you modified the FullCameras.cpp? The FullCameras node by default posts the cameras' raw data in separate topics (check here).

Also, I think that the only way to access to Guidance image raw data, is via memcpy() (check FullCameras code here)

@prlng

parlange commented 6 years ago

I am sorry, last night I ran the node and I was getting an error because of my cv setup. Now I can access separate topics for each camera. Thank you! @jimcha21