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

Replanning trigger for the navigation stack. #144

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

SimoneMic
Copy link

On this PR a parallel thread monitors the status of the feet of the robot.
Once each double support we will stream a boolean value on a port that will be red by the navigation stack. This value is the command to replan the navigation path.

Part of the changes required for the integration with the navigation stack #142 and its PR #143

Copy link
Collaborator

@S-Dafarra S-Dafarra left a comment

Choose a reason for hiding this comment

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

Some preliminary comments about the structure

src/WalkingModule/src/Module.cpp Outdated Show resolved Hide resolved
@SimoneMic
Copy link
Author

I have removed more code possible from the Module and moved it to NavigationHelper.
Also now there are separate config files and all the navigation params are there.

Copy link
Collaborator

@S-Dafarra S-Dafarra left a comment

Choose a reason for hiding this comment

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

Thanks for the update @SimoneMic, it is much clearer now. I have some more punctual comments

src/NavigationHelper/src/NavigationHelper.cpp Outdated Show resolved Hide resolved
src/NavigationHelper/src/NavigationHelper.cpp Outdated Show resolved Hide resolved
src/WalkingModule/src/Module.cpp Show resolved Hide resolved
src/WalkingModule/src/Module.cpp Outdated Show resolved Hide resolved
src/WalkingModule/src/Module.cpp Outdated Show resolved Hide resolved
src/WalkingModule/src/Module.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@S-Dafarra S-Dafarra left a comment

Choose a reason for hiding this comment

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

I just noticed a potential concurrency issue.

Copy link
Collaborator

@S-Dafarra S-Dafarra left a comment

Choose a reason for hiding this comment

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

Some final minor comments, but overall the code looks good to me. @GiulioRomualdi how do you want to proceed?

src/NavigationHelper/src/NavigationHelper.cpp Outdated Show resolved Hide resolved
Comment on lines 46 to 50
/**
* Close the Navigation Helper Threads and ports
* @return true/false in case of success/failure.
*/
bool closeThreads();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably also this can be private.

Copy link
Member

Choose a reason for hiding this comment

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

Yes and I would also add in the destructor (the same is valid for closeHelper)

Copy link
Author

Choose a reason for hiding this comment

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

I have moved it to private and added/fixed some comments/descriptions.
The destructor should never be called inside closeThreads(), since the ports could still be open.
In closeHelper() I don't see the reason to call the destructor inside a class method, since we are not dealing with special manual memory management. I would avoid that and let the owner handle it.

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.

3 participants