Closed BascoDLowell closed 5 years ago
Have you tried setting the stamp to 0,0? Or .now?
I'll try and get back to this.
Thanks
Hi @nuclearmistake ! My publisher is on one computer while my subscriber/Ros master is on another computer. I specifically need to get the .now of the Ros master.
May I know how could I do it?
I saw you have a function Ros_CSharp.ROS.GetTime()
without argument. May I know what this is doing?
GetTime() should be synced to either wall time or Ros time if it's available... If I recall
///
It's in ROS_Comm/_init.cs
Usually NTP and windows network time are advised, as Ros /time is usually more of bag / stage / gazebo thing
hmm, I see. So I really just have to find a way to set stamp to null. Is it possible with this library?
You could publish a goalid from a regular linux Ros node with a "null" stamp, and watch what is actually sent in rostopic echo... Then emulate that behavior manually in ros.net.
I guarantee transmitting a null stamp on rospy or roscpp does actually send something... Make your ros.net code send that
That should behave like you want, although you're not literally using a null stamp
Ok, will try that. Thanks for the help!
You're welcome
This solves the issue:
Messages.actionlib_msgs.GoalID goal = new Messages.actionlib_msgs.GoalID
{
id = "",
stamp = new Messages.std_msgs.Time
(
new Messages.TimeData
{
sec = 0,
nsec = 0
}
)
};
Thanks @nuclearmistake ! You may now close this issue!
Glad to hear that you got it working.
I am trying to cancel all goals by sending a
GoalId
message with emptyid
andstamp
, as was mentioned at ROS wiki.So far I tried publishing goal like:
But it would throw an exception as:
I'm quite sure, the problem is with the
stamp
as I was able to publish successfully with same emptyid
and a filled-upstamp
.