Exemplo n.º 1
0
bool QNode::on_init() {
	ros::init(init_argc,init_argv,node_name);
	if ( ! ros::master::check() ) {
		return false;
	}
	ros::start(); // our node handles go out of scope, so we want to control shutdown explicitly.
	ros_comms_init();
	start();
	return true;
}
Exemplo n.º 2
0
bool QNode::on_init(const std::string &master_url, const std::string &host_url) {
	std::map<std::string,std::string> remappings;
	remappings["__master"] = master_url;
	remappings["__hostname"] = host_url;
	ros::init(remappings,node_name);
	if ( ! ros::master::check() ) {
		return false;
	}
	ros::start(); // our node handles go out of scope, so we want to control shutdown explicitly.
	ros_comms_init();
	start();
	return true;
}