| 415 | } // namespace |
| 416 | |
| 417 | TEST(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 | |
| 435 | TEST(RobotModelLayerTest, TimeRangeIsInvertedEvenWhenLatchIsMissing) { |
| 436 | PJ::SessionManager session; |
nothing calls this directly
no test coverage detected