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

Single package.xml file for both ROS1 and ROS2 #48

Merged
merged 14 commits into from
Aug 27, 2024

Conversation

Timple
Copy link
Contributor

@Timple Timple commented Jul 12, 2021

Single package.xml file for both ROS1 and ROS2

This saves the trouble of moving around files.

Basically this is a combination of the package_ros1.xml and the package_ros2.xml since they are largely identical.
The deviating parts have a conditional guard as supported by <package format="3"> since ros kinetic.

@Timple
Copy link
Contributor Author

Timple commented Oct 21, 2021

Any update on this? It's blocking #33

@Timple
Copy link
Contributor Author

Timple commented Nov 29, 2021

If you need me to re-target this to the dev branch, please let me know.

@baoxianzhang
Copy link
Contributor

ROS1 and ROS2 xml are different in build_depend and build_tool_depend.
image

@Timple
Copy link
Contributor Author

Timple commented Dec 3, 2021

Yes they are. That is why I put conditional guards around them in this PR

@baoxianzhang
Copy link
Contributor

I got it. Good job. Test on ROS1 is OK. I will continue to test on ROS2.

@Timple
Copy link
Contributor Author

Timple commented Dec 6, 2021

Great, let me know the outcome!

@Timple
Copy link
Contributor Author

Timple commented Dec 20, 2021

Subtle ping, I felt like this was getting a bit of traction 🙂

@baoxianzhang
Copy link
Contributor

Test on ROS2 is OK. We will update soon.

@ronzheng1006
Copy link
Contributor

Hi Timple,

It is a cool solution.

However, some of other clients wish not to mixture ros1's package.xml and ros2's, so we have to keep two separate config files.

Thanks.

@Timple
Copy link
Contributor Author

Timple commented Jan 10, 2022

That is a bummer. There are guards in the CMakeLists.txt, guards in the code already. So interesting that a guard in the package.xml is too much.

But good that you took a look at the existing customer base before merging!

@ronzheng1006
Copy link
Contributor

Hi Timple,

Some clients are still working on Ubuntu 16.04/ROS Kinetic, which doesn't know depend unfortunately.
We'll merge this PR after saying bye to Kinetic.

@Timple
Copy link
Contributor Author

Timple commented Jan 20, 2022

It should support depend actually. It was introduced for Kinetic here: ros/catkin#1025

But nonetheless, kinetic is EOL: https://dlu.github.io/ros_clock/index.html
Do you have a time-estimate on when you plan to say bye to Kinetic? Because until that time we (and lots of other developers I assume?) need to patch this repository on every deployment.

One could easily tag the current master branch with a kinetic tag. All clients using legacy software can keep using that tag indefinitely (or point them to the v1.3.0 tag).

@Timple Timple changed the base branch from release to dev February 11, 2022 15:20
@Timple
Copy link
Contributor Author

Timple commented Feb 11, 2022

I rebased the feature against dev. Seems all development efforts are going there.

@Timple Timple mentioned this pull request Mar 18, 2022
@JWhitleyWork
Copy link

ROS Kinetic was EoL in April of 2021. Can we please get this merged?

@Timple
Copy link
Contributor Author

Timple commented Dec 13, 2022

These lidars are decent hardware. However software was unable to run at 10hz in ROS2, can happen.

However: no response to build fixes, no response to PR's improving code performance in ROS2, no response to this PR which improves ROS workflow.
We are evaluating other lidar manufacturers.

I will keep this PR open for those still interested in RS lidars.

@JWhitleyWork
Copy link

@Timple I am beginning to agree with your assessment. It's unfortunate because some of thier hardware is pretty decent.

robertkurvits pushed a commit to DUT-Racing/rslidar_sdk that referenced this pull request Feb 14, 2023
fix(fake_perception): check for existence of map frame
@rafa-martin
Copy link

Is there any update for this PR?. I would be nice use original repository instead of fork

@jjannik
Copy link

jjannik commented Jan 3, 2024

Is there any update?

@alexg-k
Copy link

alexg-k commented May 29, 2024

ROS1 for the default package configuration becomes more and more outdated. Please merge the efforts of the community into your products. We have just begun buying your products for evaluation purposes and software support is one part.

Copy link

@rafa-martin rafa-martin left a comment

Choose a reason for hiding this comment

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

Tested in noetic

@Timple Timple changed the base branch from dev to main July 26, 2024 06:27
@Timple
Copy link
Contributor Author

Timple commented Jul 26, 2024

So we actually did find an alternative for the rslidar lidars.

However I'm reviving an old robot and discovered this PR is still not merged...

I retargeted the PR to main as now this seems to be where development is going on.

@rafa-martin
Copy link

@Timple it seems that this branch coudn't be merged

@FelixHuang18 could you check it??

@Timple
Copy link
Contributor Author

Timple commented Aug 23, 2024

@rafa-martin do you have any intention of merging if the conflicts are resolved?

@rafa-martin
Copy link

Unfortunately, I'm not the owner of this repository. :(

@Timple
Copy link
Contributor Author

Timple commented Aug 23, 2024

Then I'm going to leave it as is...
It's functional as far as I know.

It's been three years without a response...

@FelixHuang18
Copy link
Contributor

@Timple
Hi Timple,

Thank you so much for your pull request and your contribution to the project! I want to sincerely apologize for the delay in addressing it.

Unfortunately, due to some recent changes, there are now conflicts that prevent me from merging it directly. Could I kindly ask you to resolve the conflicts and push the updated changes?

Once the conflicts are resolved, I will make it a priority to review, verify, and merge your PR as soon as possible.

I appreciate your understanding and patience, and again, thank you for your contribution!

Best regards,
Felix Huang

@Timple
Copy link
Contributor Author

Timple commented Aug 26, 2024

Here you go!

I do not speak, nor write Chinese. So any help there is appreciated.

@@ -88,6 +88,15 @@ int main(int argc, char** argv)

config_path += "/config/config.yaml";

// Pick up --config-path argument from command line
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you can provide an example on how to provide this via ROS2 parameters, this snippet can probably be gone.

But this does not work at the moment:

<?xml version="1.0" encoding="UTF-8"?>
<launch>
    <node pkg="rslidar_sdk" exec="rslidar_sdk_node" output="screen" >
        <param name="config_path" value="/path/to/rslidar.yaml" />
    </node>
</launch>

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the function you want to implement is to load the configuration path from ROS2 parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes
But the rslidar_sdk seems to consist of multiple nodes. So I am unsure how to pass a parameter to this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I modified the start.py file to pass the config_path parameter.
`from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
def generate_launch_description():

rviz_config=get_package_share_directory('rslidar_sdk')+'/rviz/rviz2.rviz'

config_file = '/home/felix/felix/ws/github/test/src/rslidar_sdk/config/config_ros2.yaml'

return LaunchDescription([
    Node(namespace='rslidar_sdk', package='rslidar_sdk', executable='rslidar_sdk_node', output='screen',
    parameters=[{'config_path': config_file}]),
    Node(namespace='rviz2', package='rviz2', executable='rviz2', arguments=['-d',rviz_config])
])`

test_load_param

@Timple
Copy link
Contributor Author

Timple commented Aug 26, 2024

Ah, that does work. Not sure where my confusion came from.

There are mutiple nodes however:

$ ros2 node list
/param_handle
/rslidar_points_destination_0

But that's out of scope for this PR I guess.

@Timple
Copy link
Contributor Author

Timple commented Aug 26, 2024

Would you like to drop the manual argument parsing? Or would it still be convenient to do this?

@FelixHuang18
Copy link
Contributor

FelixHuang18 commented Aug 26, 2024

Yes, I don't think this code is needed, can you delete it?

@rafa-martin
Copy link

😄

@@ -63,12 +58,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "")
add_definitions(-O3)
endif()

if($ENV{ROS_DISTRO} STREQUAL "humble") # the ros2 humble requires c++17
Copy link
Contributor

Choose a reason for hiding this comment

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

In addition, why is the restriction of ros version removed here?

Choose a reason for hiding this comment

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

Im not sure, but as this software is C++17 compatible, @Timple set it c++17 as default.

For new ROS2 distros you would need to add it here (iron, jazzy and rolling) if new distros are released.

Also, as you are using cmake version > 3.1. Is better define these variables:
set (CMAKE_CXX_STANDARD 17)
https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_STANDARD.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In addition, why is the restriction of ros version removed here?

It's not removed, it is still implicitly there. But the statement overlooked iron, jazzy and rolling. Currently humble is the oldest supported distro at the moment: ros_clock. So all can use c++17

@FelixHuang18 FelixHuang18 merged commit 9ed16d9 into RoboSense-LiDAR:main Aug 27, 2024
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.

8 participants