We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#459 added ros::duration-sleep() but the behavior with minus values not tested.
ros::duration-sleep()
On python, it returns immediately
>>> a = rospy.Time.now() ; rospy.sleep(rospy.Duration(1)); print((rospy.Time.now()-a).to_sec()) 1.001641989 >>> a = rospy.Time.now() ; rospy.sleep(rospy.Duration(-1)); print((rospy.Time.now()-a).to_sec()) 0.00012803
and on C++, it never returns (or will return after INT_MAX-1 [sec])
INT_MAX-1
k-okada@p51s:/tmp$ cat hoge.c #include <ros/ros.h> int main(int argc, char **argv) { ros::init(argc, argv, "test"); ros::NodeHandle(); ros::Time a = ros::Time::now(); ros::Duration(1).sleep(); std::cerr << (ros::Time::now() - a).toSec() << std::endl; a = ros::Time::now(); ros::Duration(-1).sleep(); std::cerr << (ros::Time::now() - a).toSec() << std::endl; } k-okada@p51s:/tmp$ g++ -o hoge hoge.c -I/opt/ros/kinetic/include -L/opt/ros/kinetic/lib -lroscpp -lrostime && ./hoge 1.00009 ^C12.8579
and roseus behaves similar to roscpp, I think it should be returned immediately.
(ros::roseus "test") (setq tm0 (ros::time-now)) (send (instance ros::duration :init 1.5) :sleep) (setq tm1 (ros::time-now)) (print (send (ros::time- tm1 tm0) :to-sec)) (setq tm0 (ros::time-now)) (send (instance ros::duration :init -1.5) :sleep) (setq tm1 (ros::time-now)) (print (send (ros::time- tm1 tm0) :to-sec)) ``
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#459 added
ros::duration-sleep()
but the behavior with minus values not tested.On python, it returns immediately
and on C++, it never returns (or will return after
INT_MAX-1
[sec])and roseus behaves similar to roscpp, I think it should be returned immediately.
The text was updated successfully, but these errors were encountered: