Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
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

Open
wants to merge 7 commits into
base: ros2
Choose a base branch
from

Conversation

Nihar3430
Copy link

I modified the code in handle.py and simulation.py to migrate the sub8_thrust_and_kill_board package to ROS2.

@cbrxyz cbrxyz marked this pull request as draft April 8, 2024 00:56
@cbrxyz
Copy link
Member

cbrxyz commented Apr 8, 2024

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!

@Nihar3430 Nihar3430 closed this Apr 11, 2024
@Nihar3430 Nihar3430 reopened this Apr 11, 2024
@Nihar3430 Nihar3430 marked this pull request as ready for review April 15, 2024 17:40
@Nihar3430 Nihar3430 changed the title sub8_thrust_and_kill_board migration to ROS2 sub8_thrust_and_kill_board and NaviGator/mission_control/navigator_alarm migration to ROS2 Apr 16, 2024
@Nihar3430
Copy link
Author

I also included the NaviGator/mission_control/navigator_alarm package migrated to ros2 in the PR.

Copy link
Member

@cbrxyz cbrxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@@ -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()
Copy link
Member

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.

Copy link
Author

@Nihar3430 Nihar3430 Apr 17, 2024

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/mission_control/navigator_alarm/CMakeLists.txt Outdated Show resolved Hide resolved
@Nihar3430 Nihar3430 changed the title sub8_thrust_and_kill_board and NaviGator/mission_control/navigator_alarm migration to ROS2 sub8_thrust_and_kill_board, NaviGator/mission_control/navigator_alarm migration, navigator_emergency_control, navigator_joystick_control, and navigator_keyboard_control to ROS2 Apr 28, 2024
@Nihar3430
Copy link
Author

added navigator_emergency_control, navigator_joystick_control, and navigator_keyboard_control packages to PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants