Open
Conversation
- Update sailing_robot/package.xml to format 3 with ament_cmake deps - Replace sailing_robot/CMakeLists.txt with ament_cmake + rosidl_generate_interfaces - Replace sailing_robot/setup.py with standard setuptools for ROS 2 - Add sailing_robot/setup.cfg and resource/sailing_robot marker file - Update xsens_driver/package.xml to format 3 with ament_cmake deps - Replace xsens_driver/CMakeLists.txt with ament_cmake build - Add xsens_driver/resource/xsens_driver marker file Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace rospy with rclpy + Node subclass pattern - Move module-level rospy.get_param() calls into __init__ - Replace Publisher/Subscriber with create_publisher/create_subscription - Replace Rate+while loop with create_timer callbacks - Replace rospy.log* with self.get_logger().* - Replace rospy.ROSInterruptException with KeyboardInterrupt - Add main() entry-point function with rclpy.init/shutdown - Downgrade high-frequency timer logs to debug level - Wrap hardware imports (pigpio, ina219) in try/except for sim mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- simulation_position: class-based Node, rclpy pub/sub/timer/params - simulation_velocity: class-based Node, rclpy pub/sub/timer/params - simulation_heading: class-based Node, rclpy pub/sub/timer/params - simulation_wind_apparent: class-based Node, rclpy pub/sub/timer/params - simulation_gps_fix: class-based Node, rclpy pub/sub/timer - sensor_service_imu: use tf_transformations (with scipy/manual fallback) - debugging_gps_log: class-based Node, rclpy sub/param, proper file close - wave_period: class-based Node, rclpy sub/timer - wave_position: class-based Node, rclpy sub/timer/params - sensor_driver_imu_fusion: class-based Node, rclpy pub/timer, RTIMU guard Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tring in debugging_gps_log Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace rospy with rclpy + Node subclass pattern - Move module-level rospy.get_param() calls into Node constructors - Replace dynamic_reconfigure with declare_parameter/get_parameter - Replace rospy.Publisher/Subscriber with create_publisher/create_subscription - Replace rospy.Rate loops with create_timer callbacks - Replace rospy.logXXX with self.get_logger().XXX - Replace rospy.ROSInterruptException with KeyboardInterrupt - Add proper main() functions with rclpy.init/spin/shutdown Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor project codebase to ROS2
Migrate project from ROS 1 (Indigo/catkin) to ROS 2 (rclpy/ament)
Mar 17, 2026
…r, tests Co-authored-by: tsaoyu <6488896+tsaoyu@users.noreply.github.com>
Copilot
AI
changed the title
Migrate project from ROS 1 (Indigo/catkin) to ROS 2 (rclpy/ament)
Migrate sailing-robot from ROS 1 to ROS 2
Mar 17, 2026
tsaoyu
marked this pull request as ready for review
March 18, 2026 07:52
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Full port of the sailing-robot stack from ROS 1 (Indigo/catkin/rospy) to ROS 2 (Humble/ament/rclpy). All nodes, launch files, build system, CI, and tests updated.
Build system
package.xml→ format 3,ament_cmake/ament_pythonCMakeLists.txt→ament_cmakewithrosidl_generate_interfacessetup.py/setup.cfg→ament_pythonentry-point styleLatLon→LatLon23(Python 3 compatible) throughoutNode scripts (~30 nodes)
All scripts converted from procedural
rospy.init_nodepattern to class-basedrclpy.node.Node:tasks_ros.pylibraryRosTasksRunnernow accepts anode=kwarg instead of callingrospy.Publisherat module level. A_NullPublisherstub allows the class to be instantiated in tests without a live ROS 2 daemon.xsens_driver/nodes/mtnode.pyFull rewrite:
XSensDriver(Node), all publishers created upfront in__init__, device polling moved to acreate_timercallback,tf.transformations→tf_transformationswith pure-math fallback, Python 3q_multtuple-arg syntax fixed,Header.seqremoved (dropped in ROS 2).Launch files
All XML
.launchfiles replaced with Python.launch.pyequivalents usinglaunch_ros.actions.NodeandIncludeLaunchDescription.CI
.travis.ymlrewritten for ROS 2 Humble on Ubuntu 22.04, usingcolcon buildandpytestinstead ofcatkin_makeandcatkin_make run_tests.Tests
nose.tools.assert_equal/assert_almost_equal→ plainassert+pytest.approxrostests/test_1.pyconverted fromrostest/rospyto apytestunittest.TestCaseusing rclpy directly, with@unittest.skipUnless(ROS2_AVAILABLE, ...)guard💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.