MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / TEST

Function TEST

pj_scene3D/widgets/tests/robot_model_layer_test.cpp:417–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415} // namespace
416
417TEST(RobotModelLayerTest, TopicSourceDecodesThroughParserAndAppliesFramePrefix) {
418 PJ::SessionManager session;
419 const PJ::ObjectTopicId topic_id = registerTopic(session);
420 registerParser(session, topic_id, urdfParserVtable());
421 pushWireBytes(session, topic_id);
422
423 pj::scene3d::RobotModelLayer layer(topic_id, QStringLiteral("/robot_description"));
424 layer.setFramePrefix(QStringLiteral("robot1/"));
425 const auto ctx = makeContext(session);
426
427 ASSERT_TRUE(layer.attach(ctx));
428 ASSERT_NE(layer.robotModel(), nullptr);
429 EXPECT_EQ(layer.robotModel()->root_link, "base_link");
430 EXPECT_EQ(layer.sourceFrame(), QStringLiteral("robot1/base_link"));
431 EXPECT_EQ(layer.linkFrameName("tool0"), QStringLiteral("robot1/tool0"));
432 EXPECT_TRUE(layer.fallbackFrames().contains(QStringLiteral("robot1/base_link")));
433}
434
435TEST(RobotModelLayerTest, TimeRangeIsInvertedEvenWhenLatchIsMissing) {
436 PJ::SessionManager session;

Callers

nothing calls this directly

Calls 15

urdfParserVtableFunction · 0.85
pushWireBytesFunction · 0.85
sdfParserVtableFunction · 0.85
resolvedMeshParserVtableFunction · 0.85
colladaMeshParserVtableFunction · 0.85
countingUrdfVtableFunction · 0.85
bridgeParserVtableFunction · 0.85
seedSceneChildFunction · 0.85
allCollisionParserVtableFunction · 0.85
setFramePrefixMethod · 0.80

Tested by

no test coverage detected