-
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
sub8_thrust_and_kill_board, NaviGator/mission_control/navigator_alarm migration, navigator_emergency_control, navigator_joystick_control, and navigator_keyboard_control to ROS2 #1174
base: ros2
Are you sure you want to change the base?
Conversation
Hi! I think you did not include the files you wanted to change in this PR. Please include those and change this PR to a non-draft PR and I'll take a look then! Thank you nihar! |
I also included the NaviGator/mission_control/navigator_alarm package migrated to ros2 in the PR. |
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.
Thanks
SubjuGator/drivers/sub8_thrust_and_kill_board/sub8_thrust_and_kill_board/handle.py
Show resolved
Hide resolved
@@ -154,6 +155,6 @@ def on_data(self, data: bytes, can_id: int) -> None: | |||
packet = ThrustPacket.from_bytes(data) | |||
elif data[0] == HeartbeatMessage.IDENTIFIER: | |||
packet = HeartbeatMessage.from_bytes(data) | |||
self._last_heartbeat = rospy.Time.now() | |||
self._last_heartbeat = self.get_clock().now() |
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.
Yeah, for this, you're going to need to make this class into a node. Otherwise, it will not be able to get the current time.
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.
What if I use the Clock().now() command from rclpy.clock? The current time is stored in a variable and the Clock().now() retrieves the current time without the need for a node.
… navigator_keyboard_control to ros2
added navigator_emergency_control, navigator_joystick_control, and navigator_keyboard_control packages to PR |
I modified the code in handle.py and simulation.py to migrate the sub8_thrust_and_kill_board package to ROS2.