-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
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
Ros 2 migration plan anvit #1190
Open
AnvitD
wants to merge
7
commits into
ros2
Choose a base branch
from
ros-2-migration-plan-Anvit
base: ros2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f09bc7c
Migrated to ROS2
d7aca5a
Migrated to ros2
d470397
Merge branch 'ros2' of https://github.com/uf-mil/mil into ros-2-migra…
bfee1ad
migrated mil_tools and mil_poi to ros2
271a761
made some corrections to mil_tools
66e926e
made corrections to mil_poi
128e797
updated navigator_gui to ROS2
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 |
---|---|---|
|
@@ -6,8 +6,9 @@ | |
|
||
import socket | ||
import subprocess | ||
import sys | ||
|
||
import rospy | ||
import rclpy | ||
from navigator_msgs.msg import Host, Hosts | ||
|
||
__author__ = "Anthony Olive" | ||
|
@@ -17,15 +18,16 @@ | |
__license__ = "MIT" | ||
|
||
|
||
rospy.init_node("host_monitor") | ||
rclpy.init(args=sys.argv) | ||
node = rclpy.create_node("host_monitor") | ||
|
||
|
||
class HostMonitor: | ||
def __init__(self): | ||
self.pub_hosts = rospy.Publisher( | ||
"/host_monitor", | ||
self.pub_hosts = self.create_publisher( | ||
Hosts, | ||
queue_size=1, | ||
"/host_monitor", | ||
1, | ||
latch=True, | ||
) | ||
self.hosts = Hosts() | ||
|
@@ -61,7 +63,7 @@ def check_hosts(self) -> None: | |
|
||
self.hosts.hosts.append(host) | ||
|
||
def publish(self, _: rospy.timer.TimerEvent) -> None: | ||
def publish(self, _: rclpy.timer.TimerEvent) -> None: | ||
""" | ||
Publishes the list of hosts and the information gathered about them. | ||
""" | ||
|
@@ -71,5 +73,5 @@ def publish(self, _: rospy.timer.TimerEvent) -> None: | |
|
||
if __name__ == "__main__": | ||
monitor = HostMonitor() | ||
rospy.Timer(rospy.Duration(10), monitor.publish, oneshot=False) | ||
rospy.spin() | ||
rclpy.Timer(rclpy.Duration(10), monitor.publish, oneshot=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Timers aren't created in the same way either, you want to use your node to make timers |
||
rclpy.spin() |
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
Submodule axros
updated
4 files
+10 −10 | axros/src/axros/action.py | |
+0 −17 | axros/src/axros/nodehandle.py | |
+1 −1 | axros/src/axros/serviceclient.py | |
+13 −24 | axros/src/axros/types.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
#!/usr/bin/env python3 | ||
import rospy | ||
import sys | ||
|
||
import rclpy | ||
from mil_poi import POIServer | ||
|
||
if __name__ == "__main__": | ||
rospy.init_node("poi_server") | ||
rclpy.init(args=sys.argv) | ||
node = rclpy.create_node("poi_server") | ||
|
||
server = POIServer() | ||
rospy.spin() | ||
rclpy.spin() |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rclpy.Time.now()
does not exist in ROS 2