-
Notifications
You must be signed in to change notification settings - Fork 194
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
gymkhana scoring plugin #540
Conversation
Not currently being bridged:
|
@caguero Just an FYI, it appears that the bridges are currently hard-coded for specific topic strings (e.g. For now, I will add some bridges for the topic names we use in the |
Draft TODO List
|
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.
It works for me as expected. I only added a few very minor comments.
class GymkhanaScoringPlugin::Implementation | ||
{ | ||
/// \brief Callback for black box station-keeping portion's scoring plugin | ||
public: void BlackboxCallback(const msgs::Param &_msg); |
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.
Could you document the _msg
parameter?
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.
Done! I realized our taskMsg is not documented anywhere so I also added this to ScoringPlugin.cc
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 also realized this plugin itself does not seem to have ever really been documented, so I put a description in GymkhanaScoringPlugin.hh
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.
Great! Thanks
vrx_gz/src/GymkhanaScoringPlugin.cc
Outdated
void GymkhanaScoringPlugin::ChannelCallback( | ||
const msgs::Param &_msg) | ||
{ | ||
if (_msg.IsInitialized()) // TODO: Check |
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.
Out of curiosity, what's the reason for checking this?
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 don't know... maybe it isn't necessary? (That's what my TODO is reminding me to ask about.) I was trying to port the code from our previous implementation in gymkhana_scoring_plugin.cc
, which uses:
if (msg)
I assumed the intent was to check whether a null message had been passed into the callback, but the syntax produces an error in gazebosim, which will not automatically cast msg as a boolean, so I added IsInitialized()
thinking this was the intent. As to why the callback would be receiving an empty message... I don't know. Seems like a workaround for a bug, maybe. Should I take it out?
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 don't think this is necessary here. In the past maybe _msg
was a pointer and we wanted to make sure it wasn't null
but it's safe here.
To test
Launch the task:
In a separate terminal, launch the teleop:
In a third terminal, echo the
/vrx/task/info
topic:Test Navigation Channel
onrunning
state.It should give you the same value.
Test Stationkeeping plugin
With the simulation still paused, use the GUI to teleport the WAMV to the pinger position:
/wamv/pingers/pinger/range_bearing
and/vrx/gymkhana_blackbox/pose_error
. The range and the pose error should be similar and near zero./vrx/task/info
and/vrx/gymkhana_blackbox/mean_pose_error
. These should be the same and should be steadily decreasing.Known Limitations