-
Notifications
You must be signed in to change notification settings - Fork 148
AIRO-1617 Private ros params #123
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
AIRO-1617 Private ros params #123
Conversation
Hi, I'll be testing and bringing our tutorials into sync with this PR. Removing the params.yaml file is a little awkward; currently our Docker environment overwrites this so that users don't have to manually set their IP to 0.0.0.0: Are you aware of a simple way to preserve this behaviour? I'm currently considering making a separate launch file for Docker users to invoke, perhaps "endpoint0.launch", that just says:
|
Hi, there are different ways to achieve this:
<launch>
<arg name="tcp_ip" default="$(optenv DOCKER_IP_OVERRIDE 127.0.0.1)"/>
... This is nice since it still allows to change the tcp_ip when calling the launch file. roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:=0.0.0.0 should be used. Option 1 is somehow the most simple one, if you do not have security concerns. |
Thanks for the in-depth analysis! On reflection, I think it's reasonable to change the default IP to 0.0.0.0; any users who have security concerns can set it to something sensible anyway. |
This is also my preferred solution and it seems to be a common one. |
c7e3ece
into
Unity-Technologies:laurie/PrivateRosParams
Thanks for this. Merged into a side branch for testing, but if all goes well it will go into dev-ros today. |
Proposed change(s)
The ROS parameters /ROS_IP and /ROS_TCP_PORT have been renamed and made private.
Global parameters would pollute the ROS namespace and lead to conflicts.
Capital parameter names are very uncommon in ROS.
Parameter names should not include the name ROS, as this does not provide a meaning inside ROS.
The config/param.yaml was removed, as this was used to set the global /ROS_IP.
The endpoint.launch was adjusted, to set the private parameters ~tcp_ip and ~tcp_port.
For this to work, also the default_server_endpoint.py needed to be adjusted.
Before it set a fixed node name 'UnityEndpoint' like:
This is basically a bug and very confusing, since it prevents that ROS launch files can set a node's name.
The correct code is:
The default node name was set to 'unity_endpoint' as camel case names are very uncommon to name ROS nodes.
'unity_endpoint' is now also the name assigned to the node in the endpoint.launch. Before the two names were in conflict.
Useful links (GitHub issues, JIRA tickets, forum threads, etc.)
This resolves #115
Types of change(s)
Testing and Verification
The unittests have been executed. All 38 tests succeeded.
By using the launch file it is possible to change the ROS parameters:
Test Configuration:
Checklist
dev
branchdev
branchOther comments
I think quite some rework of the documentation under:
https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/setup.md
is required.
The usage of setparam and rosrun is not correct anymore.
Preferably the use of the endpoint.launch file should be described more.
Please tell me if you like my support for this.