-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add mros_contingencies_sim #48
Conversation
Cool idea, but what do you refer to with the |
Hi @chcorbato! You are right. I was fixing it, and I found an open PR about this. It seems like the diagram and the implementation differ a bit, and it is not possible to transit from de Activate state to ErrorProcessing, at least for now. We could compile this PR, but this means compile ROS2... Any idea? @fmrico |
I don't like the idea of depending on compiling ROS2, or something similar. We depend on the acceptance of that PR. Meanwhile, is it possible to do the transitions active->inactive->Unconfigured and the Error? |
I have tried it, and not... No |
Rather than work arounds, I think a valuable contribution from MROS would be to fix this so that ROS2 complies with its own formal models and improves quality. What do you think? |
I have updated the contingency simulator. Now, it injects all-zero laser_scan msgs in the network and the laser_driver wrapper (the lifecyclenode) detects this messages and self-transits to ErrorProcessing. |
I am trying to test the branch
help is welcome! |
Are you building in /home/USER/MROS_WS? Did you source ROS2 and the ws? |
Something weird with my ws, now it is working, thanks @jginesclavero |
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 have updated the contingency simulator. Now, it injects all-zero laser_scan msgs in the network and the laser_driver wrapper (the lifecyclenode) detects this messages and self-transits to ErrorProcessing.
This is the behavior I observe in the first terminal (tb3_sim_launch.py
):
[laser_resender_node-4] [WARN] [1601452186.621478064] [laser_resender]: [laser_resender] ALL-ZEROS. It has to go to error processing state
[laser_resender_node-4] [WARN] [1601452186.621572066] []: Error occurred while doing error handling.
[laser_resender_node-4] [ERROR] [1601452186.621582193] [laser_resender]: [laser_resender] Error processing from [active] state...
LGTM, please go ahead and merge if @fmrico is ok too.
LGTM. Merging!! |
MROS contingencies simulator
This PR adds two functionalities to simulate some contingencies, following @chcorbato suggestions in #46:
I have added a node that is a subscriber of AMCL (to know how many meters the robot has moved) and takes the battery consumption per meter as input. With this information, the robot's battery is calculated and published in a topic (/robot/battery).
I have added an RVIz panel to easily the simulation of the laser driver failure. This panel has a button to switch the laser driver node into a DEACTIVATE state.