Skip to content

Commit 680b1c7

Browse files
committed
support empty srdf string
1 parent 17e5c23 commit 680b1c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/robotinterface2.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ RobotInterface::UniquePtr RobotInterface::getRobot(std::string urdf_string,
8383
{
8484
XBotInterface::ConfigOptions opt;
8585
opt.set_urdf(urdf_string);
86-
opt.set_srdf(srdf_string);
86+
87+
if(!srdf_string.empty())
88+
{
89+
opt.set_srdf(srdf_string);
90+
}
8791

8892
return getRobot(opt.urdf, opt.srdf, robot_type, model_type);
8993
}

0 commit comments

Comments
 (0)