-
Notifications
You must be signed in to change notification settings - Fork 48
RVIZ RobotModel dynamic update #471
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
RVIZ RobotModel dynamic update #471
Conversation
for more information, see https://pre-commit.ci
…c_rtc into topic/robot-autodisplay
for more information, see https://pre-commit.ci
|
Thanks a lot for this, this is indeed a much needed improvement 👍 From a first quick glance at it:
|
|
@arntanguy
|
…c_rtc into topic/robot-autodisplay
for more information, see https://pre-commit.ci
arntanguy
left a comment
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.
Thanks for taking into account my comments. I have a few more nitpicks and a small additional concern.
Also please rebase onto master, this should now make CI pass.
plugins/ROS/src/plugin/ROS.cpp
Outdated
| update_env("control/", controller.robots()); | ||
| if(publish_real) { update_env("real/", controller.robots()); } | ||
|
|
||
| if(controller.robots().size() != mc_rtc::ROSBridge::nb_robot_publisher() / (publish_real ? 2 : 1)) |
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.
Won't this fail if we remove a robot and add a different robot? The size is the same thus we would not remove the extra robots. I think we should explicitly check whether the topic is still required.
Note that in PR #462 we introduced a signal mechanism to notify changes to the robots that would simplify this kind of bookkeeping. We can revisit it once it's merged.
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.
Indeed, a problem will appear here.
Using signals for the #462, would definitely make things better.
I'll remove the condition
|
Thanks, I merged with master (rebase was tricky due to the many intermediate pre-commit merge), will merge when pipeline succeeds 👍 |
f2fdd12 to
01b8700
Compare
01b8700 to
a49d253
Compare
The goal of this PR is to add ros topic prefix to RobotModule parameters in order for mc_rtc rviz plugin to automatically subscribe and display the robot.