Skip to content

Commit

Permalink
[ontopy] fix ros1 feederpublisher
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed Jan 12, 2024
1 parent 4b4c980 commit 1664e68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions ontopy/ontologenius/FeederPublisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
import os

from std_msgs.msg import String
if os.environ["ROS_VERSION"] == "1":
from ontologenius.msg import StampedString
else:
from ontologenius.msg import OntologeniusStampedString as StampedString
from ontologenius.msg import OntologeniusStampedString as StampedString

import time
import random
Expand Down
4 changes: 3 additions & 1 deletion ontopy/ontologenius/compat/ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def createSubscriber(sub_name, sub_type, callback):
return OntoSubscriber(sub_name, sub_type, callback)

def getRosTime():
return rospy.get_rostime() # TODO
t_msg = rospy.get_rostime()
stamp_msg = OntologeniusTimestamp(seconds = t_msg.secs, nanoseconds = t_msg.nsecs)
return stamp_msg

def isShutdown():
return rospy.is_shutdown()
Expand Down

0 comments on commit 1664e68

Please sign in to comment.