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

ros::NodeHandle::SpinOnce almost never called #29

Closed AlexisTM closed 7 years ago

AlexisTM commented 7 years ago

Hi,

The spinOnce function has to be called in order to call callbacks, or use the logs like ROS_DEBUG("Some log");.

https://github.com/dji-sdk/Guidance-SDK-ROS/blob/master/src/GuidanceNode.cpp#L354

    while (ros::ok())
    {
        if (key > 0){
            [...]
            ros::spinOnce();
        }
    }

should be

    while (ros::ok())
    {
        if (key > 0){
            [...]
        }
                ros::spinOnce();
    }
lanyusea commented 7 years ago

agree

tangketan commented 7 years ago

@AlexisTM Thanks. Bug fixed.