-
Notifications
You must be signed in to change notification settings - Fork 332
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
tf_prefix param: add to IMU Broadcaster and fix slashes in DiffDrive #1104
Open
rafal-gorecki
wants to merge
12
commits into
ros-controls:master
Choose a base branch
from
rafal-gorecki:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+202
−189
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2412651
tf_prefix param: fix slashes and add to IMU Broadcaster
rafal-gorecki a38ed95
Add namespace
rafal-gorecki e4aa06e
Use InitController
rafal-gorecki df173d8
Rename variable
rafal-gorecki bd24d4c
typo
rafal-gorecki 92679fc
pre-commit
rafal-gorecki 52104aa
Fix imu
rafal-gorecki 1292fad
fix imu namespace
rafal-gorecki 2f0ce56
Merge branch 'master' into master
rafal-gorecki aabcf74
Merge branch 'master' into master
rafal-gorecki 70cfc29
Add sensor_name prefix
rafal-gorecki 119144a
Merge branch 'master' into master
rafal-gorecki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2020 PAL Robotics SL. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include <string> | ||
|
||
struct PrefixTestCase | ||
{ | ||
std::string tf_prefix; | ||
std::string ns; | ||
std::string result_prefix; | ||
}; |
This file contains 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
This file contains 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
9 changes: 5 additions & 4 deletions
9
imu_sensor_broadcaster/test/imu_sensor_broadcaster_params.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
test_imu_sensor_broadcaster: | ||
ros__parameters: | ||
/**: | ||
test_imu_sensor_broadcaster: | ||
ros__parameters: | ||
|
||
sensor_name: "imu_sensor" | ||
frame_id: "imu_sensor_frame" | ||
sensor_name: "imu_sensor" | ||
frame_id: "imu_sensor_frame" |
Oops, something went wrong.
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.
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.
Hello!
While reviewing this part again, I started to question myself, if we need this or not. I'm saying because in case of the diff_drive_controller, the
odom
message that is being published is a dynamic tf frame, but in case of the imu_state_broadcaster, as per the imu you always have a static transform link inside the URDF, I don't know if it make sense to have thetf_prefix
in this case.Right now, your changes will add namespace of the controller manager to the links, I'm not sure how right is it.
Does it make sense?. Should we check if the link exists from the loaded URDF?
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.
Hi @saikishor,
Thank you, for reply!
I'm not sure what difference it makes whether fame is dynamic or static in the case of tf_prefix. I treat it as an option that may be useful to someone. What I care about most is the ability to correctly assign a frame to a robot when many robots are launched.
I'm still wondering about the issue of
sensor_name
, because while in the case of a real robot there should be no problems, in the simulation you need to create sensor objects with different namespaces.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.
Hello!
I think it is rather very important, because the sensor readings should correspond to a specific frame on the robot and this might be important. Regarding multi robot i agree that we would need this separation, then we can use the namespace, but why tf_prefix?. Moreover, i believe we have to make sure that it is a valid link.
Can you explain to me the instances that's a requirement for you?
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 are asking specifically about tf_prefix, I don't need it, but I added it to unify arg in the packages.
As for checking whether a frame exists, it makes sense.
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.
What do you think about the problem with
sensor_name
? The simplest solution is to add a parameter that adds a namespace tosensor_name
or add a sensor name prefix.Generally, what I care about is being able to run many robots in simulation and on hardware while making a minimum number of changes to the code.
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.
@rafal-gorecki ok now I got the use-case. Yes, it is tricky to make it work with simulation with this namespace. What can be done is probably, instead of using the
tf_prefix
, just add it to thesensor_name
already. I'm not sure how to automatically configure it based on the robot. The current changes however, doesn't fix it right?Any ideas on how to solve it are welcome
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.
Thank you, so much for today. I will try to add this functionality soon. I would like to ask you to confirm whether this tf_prefix can be left for imu in order to standardize the packages, or should I get rid of it?
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.
Let's discuss your idea on how you are planning to tackle the idea of sensor name automatically, and then it's better to start changing
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.
robot_state_publisher
with namespace add to alllink
reference_frame
andsensor topic
namespaces.namespace
argument to URDF and put it in all resonable field.Then add the argument
add_namespace_to_sensor_name
(bool)@saikishor what do you think?
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.
Second solution added