diff --git a/python/src/rviz_visual_tools.cpp b/python/src/rviz_visual_tools.cpp index 9af4a51..1821034 100644 --- a/python/src/rviz_visual_tools.cpp +++ b/python/src/rviz_visual_tools.cpp @@ -22,7 +22,11 @@ PYBIND11_MODULE(pyrviz_visual_tools, m) */ m.def( "init", - [](const std::vector& args) { + [](std::vector args) { + if (args.empty()) + { + args = py::module::import("sys").attr("argv").cast>(); + } std::vector raw_args; raw_args.reserve(args.size()); for (const auto& arg : args)