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

added repitition to robot_description reading #53

Conversation

VahidAminZ
Copy link

@VahidAminZ VahidAminZ commented Jun 1, 2016

fixes #52

@@ -62,6 +62,12 @@ class JointStateListener {
/// Destructor
~JointStateListener();

// Number of tries for reading robot_description from parameter server
static const size_t description_read_repitions_;
Copy link
Contributor

Choose a reason for hiding this comment

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

Change to description_read_repititions_?

Copy link
Author

Choose a reason for hiding this comment

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

fixed.

@jacquelinekay
Copy link
Contributor

I think that the best implementation of this feature would be to add description_read_repetitions and description_read_delay as ROS parameters with default values if the parameters are not set on the server.

@VahidAminZ
Copy link
Author

@jacquelinekay Makes sense. I changed it accordingly. I am not sure about default values though.

@jacquelinekay
Copy link
Contributor

I would consider making the default value for default_descriptions_read_repetitions 0. That way users can opt into the new behavior.

@ros/ros_team and @ros/robot_model, do you have any feedback on this new workaround for nondeterministic startup behavior?

@VahidAminZ
Copy link
Author

@jacquelinekay changed the default repetitions to 0.

@toliver
Copy link
Contributor

toliver commented Dec 9, 2016

Hi @jacquelinekay just checking if this PR can be merged or there is some fundamental disagreement on the content.

If it's going to be merged we can resolve the conflicts.

…tween them are controlled by parameters. It defaults to the current behaviour.
@toliver toliver force-pushed the F#52_double_check_for_robot_description branch from 672158a to 2a0d5b2 Compare February 7, 2017 15:46
@toliver
Copy link
Contributor

toliver commented Feb 7, 2017

This has been rebased and the checks are passing. Do you think it can be merged?

@sloretz
Copy link
Contributor

sloretz commented Feb 8, 2017

Hi @toliver, thanks for the contribution. If I understand correctly this enables robot_state_publisher to wait for the parameter "robot_description" to be set for a fixed amount of time.

Would you mind adding a test to make sure it does not wait by default, and a test to make sure it can wait when the two parameters are set?

Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

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

Just a couple changes

@@ -62,6 +62,12 @@ class JointStateListener {
/// Destructor
~JointStateListener();

// Default value for number of attempts to read robot_description from parameter server
static const int default_description_read_repetitions_;
Copy link
Contributor

@sloretz sloretz Feb 8, 2017

Choose a reason for hiding this comment

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

I think adding these two constants to the JointStateListener class breaks ABI, which would block merging into kinetic-devel. Since these are only used in main(), how about they be local variables there?

JointStateListener::default_description_read_delay_ << " seconds will be used.");
description_read_delay = JointStateListener::default_description_read_delay_;
}
for (size_t i = 0; i < description_read_repetitions; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a test for this code.

@sloretz
Copy link
Contributor

sloretz commented Feb 8, 2017

@clalancette Thoughts?

@sgillen
Copy link

sgillen commented Apr 3, 2017

Sorry to nose in, are there plans to move ahead with this pull request? It would be useful for my application as well. I can help with the requested changes if need be.

@clalancette
Copy link
Contributor

I'm wondering if there is a nicer way to do this ,rather than just polling for a set amount of time. That is, it seems to me like it might be better for robot_state_publisher to have a configurable topic that would get published to once the robot description is available. That way, it would just wait around until that event happened, rather than polling the parameter server. Thoughts about an approach like that?

@ahcorde ahcorde added the ros1 label Aug 21, 2024
@ahcorde
Copy link
Contributor

ahcorde commented Aug 21, 2024

This PR is targeting an EOL ROS distro, closing this. Feel free to reopen this PR in an active ROS distro if the PR is relevant

@ahcorde ahcorde closed this Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants