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
|
caguero
left a comment
There was a problem hiding this comment.
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.
Could you document the _msg parameter?
There was a problem hiding this comment.
Done! I realized our taskMsg is not documented anywhere so I also added this to ScoringPlugin.cc
There was a problem hiding this comment.
I also realized this plugin itself does not seem to have ever really been documented, so I put a description in GymkhanaScoringPlugin.hh
| void GymkhanaScoringPlugin::ChannelCallback( | ||
| const msgs::Param &_msg) | ||
| { | ||
| if (_msg.IsInitialized()) // TODO: Check |
There was a problem hiding this comment.
Out of curiosity, what's the reason for checking this?
There was a problem hiding this comment.
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.
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.
gymkhana scoring plugin
To test
Launch the task:
In a separate terminal, launch the teleop:
In a third terminal, echo the
/vrx/task/infotopic:Test Navigation Channel
onrunningstate.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_bearingand/vrx/gymkhana_blackbox/pose_error. The range and the pose error should be similar and near zero./vrx/task/infoand/vrx/gymkhana_blackbox/mean_pose_error. These should be the same and should be steadily decreasing.Known Limitations