OSDK TOPIC_GPS_FUSED subscription Issue
CompletedDear DJI Team ,
I am using OSDK 4.1 with M300 RTK and Raspberrypi4.
I am developing an Application with Telemetry & Battery Sample code in One Thread and Waypoint Mission in another Thread. Telemetry Sample code containing subscribing topics like TOPIC_GPS_FUSED and other topics ... In WaypointMission thread, It also subscribing Same Topics. I am giving pkgindex starting from 0 for Telemetry and In waypoint mission, i am giving pkgindex 0 for TOPIC_GPS_FUSED.
when i am running application , i am getting Error
[1374370.279]STATUS/1 @ verify, L244: Verify subscription successful.
[1374370.279]ERRORLOG/1 @ initPackageFromTopicList, L172: package [0] is being occupied.[1374370.281]ERRORLOG/1 @ runWaypointV2Mission, L287: Failed to set up subscription!
then i changed pkgindex to 5 for Waypoint mission subscriber, Then i am getting error like
[1374566.799]STATUS/1 @ verify, L244: Verify subscription successful.
[1374566.839]STATUS/1 @ startPackage, L345: Start package 5 result: 36.
[1374566.839]STATUS/1 @ startPackage, L347: Package 5 info: freq=1, nTopics=1.
[1374566.839]STATUS/1 @ getErrorCodeMessage, L744: startPackage
[1374566.839]STATUS/1 @ getCMDSetSubscribeMSG, L828: SUBSCRIBER_MULTIPLE_SUBSCRIBE
[1374566.844]STATUS/1 @ getErrorCodeMessage, L744: setUpSubscription
[1374566.844]STATUS/1 @ getCMDSetSubscribeMSG, L828: SUBSCRIBER_MULTIPLE_SUBSCRIBE
[1374566.880]STATUS/1 @ getErrorCodeMessage, L744: removePackage
[1374566.880]STATUS/1 @ getCMDSetSubscribeMSG, L828: SUBSCRIBER_PACKAGE_DOES_NOT_EXIST
[1374566.880]STATUS/1 @ setUpSubscription, L250: Error unsubscribing; please restart the drone/FC to get back to a clean state.
then i changed pkgindex to 10 for Waypoint mission subscriber, Then i am getting error like
[1375485.567]STATUS/1 @ verify, L244: Verify subscription successful.
[1375485.587]STATUS/1 @ startPackage, L345: Start package 0 result: 4.
[1375485.587]STATUS/1 @ startPackage, L347: Package 0 info: freq=1, nTopics=1.
[1375485.587]STATUS/1 @ getErrorCodeMessage, L744: startPackage
[1375485.587]STATUS/1 @ getCMDSetSubscribeMSG, L828: SUBSCRIBER_PACKAGE_ALREADY_EXISTS
[1375485.593]STATUS/1 @ getErrorCodeMessage, L744: setUpSubscription
[1375485.593]STATUS/1 @ getCMDSetSubscribeMSG, L828: SUBSCRIBER_PACKAGE_ALREADY_EXISTS
[1375485.608]STATUS/1 @ getErrorCodeMessage, L744: removePackage
[1375485.608]STATUS/1 @ getCMDSetSubscribeMSG, L828: SUBSCRIBER_PACKAGE_OUT_OF_RANGE
[1375485.608]STATUS/1 @ setUpSubscription, L250: Error unsubscribing; please restart the drone/FC to get back to a clean state.
2021-11-24 16:47:05 [Waypoint_V2] HERE 3
[1375485.609]ERRORLOG/1 @ runWaypointV2Mission, L287: Failed to set up subscription!
I have some concerns on this ?
1 : How to set this pkgindex when we subscribing One TOPICS from multiple threads?
2: How to set this pkgindex when subscribing multiple topics in multiple threads?
-
![](https://djisdksupport.zendesk.com/attachments/token/nvfcmzKbSzckxySOs8yXpMmUx/?name=inline1400270628.png) The log shows that pkgindex is defined repeatedly, and duplicate pkgIndex cannot be set in the same OSDK process.
Please sign in to leave a comment.
Comments
1 comment