-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
An example publisher of basic NavSatFix data, mostly for testing. | ||
""" | ||
from random import random | ||
|
||
import rospy | ||
from sensor_msgs.msg import NavSatFix | ||
|
||
|
||
def navsatfix_test_pub(): | ||
pub = rospy.Publisher("navsat", NavSatFix, queue_size=1) | ||
rospy.init_node("navsatfix_test_pub") | ||
|
||
rate = rospy.Rate(1) | ||
|
||
longitude = 0 | ||
|
||
while not rospy.is_shutdown(): | ||
pub.publish(latitude=0, longitude=longitude) | ||
longitude += random() | ||
rate.sleep() | ||
|
||
|
||
if __name__ == "__main__": | ||
try: | ||
navsatfix_test_pub() | ||
except rospy.ROSInterruptException: | ||
pass |