-
Notifications
You must be signed in to change notification settings - Fork 276
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 static pose publisher and support pose_v msg type in pose_publisher system #65
Conversation
doxygen fixes Co-Authored-By: Nate Koenig <nkoenig@users.noreply.github.com>
Pr65 suggestions
@osrf-jenkins run tests |
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
/// performance. | ||
public: ignition::msgs::Pose_V poseVMsg; | ||
|
||
|
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.
Nit: extra vertical whitespace
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.
removed. 4255f22
{ | ||
auto entityIt = this->entitiesToPublish.find(entity); | ||
if (entityIt == this->entitiesToPublish.end()) | ||
continue; | ||
|
||
if (this->usePoseV) | ||
msg = this->poseVMsg.add_pose(); |
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.
Maybe curly braces around one line of logic.
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.
added. 4255f22
// frame_id: parent entity name | ||
// child_frame_id = entity name | ||
// pose is the transform from frame_id to child_frame_id | ||
auto header = this->poseMsg.mutable_header(); | ||
auto header = msg->mutable_header(); |
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.
Is there any chance of msg
being null here?
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 should never be null. Added IGN_ASSERT
to be sure. 4255f22
} | ||
mutex.unlock(); | ||
|
||
|
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.
Nit: extra vertical whitespace
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.
removed. 4255f22
test/worlds/pose_publisher.sdf
Outdated
<static_publisher>true</static_publisher> | ||
<use_pose_vector_msg>true</use_pose_vector_msg> | ||
</plugin> | ||
|
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.
Extra whitespace
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.
removed. 4255f22
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.
Just a few style nits, but otherwise looks good.
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Added two features to help reduce bandwidth of pose-publisher's pose topic
Static pose publisher:
<static_publisher>
sdf element is set to true, a static pose publisher is created that publishes static pose transform for entities in the model that do not change pose. Links connected by joints are considered as dynamic entities (except for canonical link) and their pose is published to the original/model/[model_name]/pose
topic, while the rest are published to the new/model/[model_name]/pose_static
topic./tf_static
topic so we don't have to keep publishing the data but I don't think ign transport has latched support yet. So I added<static_update_frequency>
sdf element to let users configure / reduce the publisher's update ratePose_V message:
<use_pose_vector_msg>
sdf element to support publishingignition::msgs::Pose_V
msgs (vector of poses at one sim iteration) as opposed to individualignition::msgs::Pose msgs
. This helps to reduce the number of published msgs with the trade-off of larger msg size. The default pose publisher's publish rate should now be equal to the simulation's update rate, whereas before the update rate was equal to num_entities_in_model * sim_update_raterelated ros_ign pull request