Skip to content

Port MARSIM to ROS 2 - #27

Open
Jaeyoung-Lim wants to merge 1 commit into
hku-mars:ubuntu20from
Jaeyoung-Lim:pr-port-ros2
Open

Jaeyoung-Lim wants to merge 1 commit into
hku-mars:ubuntu20from
Jaeyoung-Lim:pr-port-ros2

Conversation

@Jaeyoung-Lim

@Jaeyoung-Lim Jaeyoung-Lim commented Oct 23, 2025 •

Copy link
Copy Markdown

Problem Descrption
ROS 1 has reached its EOL in May 2025. Therefore, it would be great to have ROS 2 support for MARSIM.

Additionally, recent robotics implementations have been moving towards ROS 2 as well.

Solution
This commit ports MARSIM to ROS 2.

Not all functionalities might be working for ROS 2.
However, the ROS 2 implementation can be tested with the following launch file.

ros2 launch test_interface single_drone_mid360.launch.py

Fixes #13 #25

Additional Context

  • This implementation was done to test lidar inertial odometry with the PX4 Autopilot

This commit ports MARSIM to ROS 2
@jackykongfz

Copy link
Copy Markdown
Collaborator

Pretty much thanks to Lim's large support for attaching MARSIM to ROS2!!!! I have created a branch ubuntu20_ros2 to maintain it. Since I do not have ROS2 environment now so the code is not tested locally yet, I will close this pull request until I test it.

@Jaeyoung-Lim

Jaeyoung-Lim commented Oct 25, 2025 •

Copy link
Copy Markdown
Author

@jackykongfz Great, thanks. Glad to see that you find it useful.

Given the large differences in the implementation, I think it might be easier to maintain on a separate repo (e.g. MARSIM2). However, I leave the decision up to you.

@xxl1998

xxl1998 commented Nov 9, 2025

Copy link
Copy Markdown

@Jaeyoung-Lim Thanks for your work on porting MARSIM to ROS2, this saved much of my time.
But I still found some issues in your code.
1: The launch uses absolute path to find .pcd, so it can not run on other's computer;
2: The broken dependency makes compile error;
3: A default param makes cascadePID diverge;
4: The UAV model was not in rviz.
So I made some small modification based on your code, and I will create a PR later to merge it to this repository.

@Jaeyoung-Lim

Copy link
Copy Markdown
Author

@xxl1998 Thank you for pointing out the limitation of this PR. It would be great if you can make a PR against this PR such that we can keep track of the changes.

@shupx

shupx commented Dec 6, 2025

Copy link
Copy Markdown

I have noticed that there is a ROS2 implementation of MARSIM in SUPER (https://github.com/hku-mars/SUPER/tree/master/mars_uav_sim). Is there any difference between that with this repo?

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.

ROS 2 update

4 participants