rl icon indicating copy to clipboard operation
rl copied to clipboard

run the first applications

Open csufangyu opened this issue 5 years ago • 2 comments

hi when i use your first applications on https://www.roboticslibrary.org/tutorials/first-steps-linux/,I get a error :+1: error: cannot dynamic_cast ‘rl::mdl::Factory::create(const string&)(std::__cxx11::basic_string(((const char*)"/usr/share/rl-0.7.0/examples/rlmdl/unimation-puma560.xml"), std::allocator()))’ (of type ‘class std::shared_ptrrl::mdl::Model’) to type ‘class rl::mdl::Kinematic*’ (source is not a pointer) rl::mdl::Kinematic* kinematics = dynamic_castrl::mdl::Kinematic*(factory.create("/usr/share/rl-0.7.0/examples/rlmdl/unimation-puma560.xml"));

could you help me?thanks very much

csufangyu avatar Oct 06 '20 11:10 csufangyu

change : std::shared_ptr<rl::mdl::Kinematic> kinematics = std::dynamic_pointer_cast<rl::mdl::Kinematic>(factory.create("/usr/share/rl-0.7.0/examples/rlmdl/unimation-puma560.xml")); is ok!

csufangyu avatar Oct 06 '20 11:10 csufangyu

Thank you for pointing this out. I have updated the tutorials with code that should work for both the 0.7 and master branch.

rickertm avatar Oct 17 '20 14:10 rickertm