How to connect remote roscore with python in runtime
The following is the implementation using roscpp:
std::map<std::string, std::string=""> remappings;
remappings["__master"] = master_url;
remappings["__hostname"] = host_url;
ros::init(remappings, "node name");
parement "master_url" and "host_url" come from UI
So how to implement using python?
Can you please clarify: What are you trying to achieve? What have you tried? What do you expect to happen and what happens instead? And please make sure your code is correctly formatted.
I want to connect remote roscore with python, The above code implements the function of connecting to a remote roscore using roscpp.
roscpp: std::map<std::string, std::string=""> remappings; remappings["__master"] = master_url; remappings["__hostname"] = host_url; ros::init(remappings, "node name");
the rospy project come from catkin_create_qt_pkg
the code in 'src/qnode.cpp' lline 57-59