-
Notifications
You must be signed in to change notification settings - Fork 228
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
Conversation
Any update on this? It's blocking #33 |
If you need me to re-target this to the |
Yes they are. That is why I put conditional guards around them in this PR |
I got it. Good job. Test on ROS1 is OK. I will continue to test on ROS2. |
Great, let me know the outcome! |
Subtle ping, I felt like this was getting a bit of traction 🙂 |
Test on ROS2 is OK. We will update soon. |
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. |
That is a bummer. There are guards in the CMakeLists.txt, guards in the code already. So interesting that a guard in the But good that you took a look at the existing customer base before merging! |
Hi Timple, Some clients are still working on Ubuntu 16.04/ROS Kinetic, which doesn't know |
It should support But nonetheless, kinetic is EOL: https://dlu.github.io/ros_clock/index.html One could easily tag the current master branch with a |
I rebased the feature against |
ROS Kinetic was EoL in April of 2021. Can we please get this merged? |
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. I will keep this PR open for those still interested in RS lidars. |
@Timple I am beginning to agree with your assessment. It's unfortunate because some of thier hardware is pretty decent. |
fix(fake_perception): check for existence of map frame
Is there any update for this PR?. I would be nice use original repository instead of fork |
Is there any update? |
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. |
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.
Tested in noetic
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 |
@Timple it seems that this branch coudn't be merged @FelixHuang18 could you check it?? |
@rafa-martin do you have any intention of merging if the conflicts are resolved? |
Unfortunately, I'm not the owner of this repository. :( |
Then I'm going to leave it as is... It's been three years without a response... |
@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, |
Here you go! I do not speak, nor write Chinese. So any help there is appreciated. |
node/rslidar_sdk_node.cpp
Outdated
@@ -88,6 +88,15 @@ int main(int argc, char** argv) | |||
|
|||
config_path += "/config/config.yaml"; | |||
|
|||
// Pick up --config-path argument from command line |
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.
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>
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.
Is the function you want to implement is to load the configuration path from ROS2 parameters?
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.
Yes
But the rslidar_sdk
seems to consist of multiple nodes. So I am unsure how to pass a parameter to this.
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.
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])
])`
Ah, that does work. Not sure where my confusion came from. There are mutiple nodes however:
But that's out of scope for this PR I guess. |
Would you like to drop the manual argument parsing? Or would it still be convenient to do this? |
Yes, I don't think this code is needed, can you delete it? |
😄 |
@@ -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 |
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.
In addition, why is the restriction of ros version removed here?
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.
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
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.
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
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 thepackage_ros2.xml
since they are largely identical.The deviating parts have a conditional guard as supported by
<package format="3">
since ros kinetic.