diff --git a/libraries/create_action_server.sh b/libraries/create_action_server.sh index b4c0ce1e925b1ea15353ac88ced1c669f34498b2..ccb4be139ceeb0a068cd68d31f9831abc1b5a5df 100644 --- a/libraries/create_action_server.sh +++ b/libraries/create_action_server.sh @@ -141,7 +141,7 @@ function check_action_server_attributes_functions fi # check the node.cpp file - aux_line="${server_name}(public_node_handle_, \"${topic_name}\")" + aux_line="${server_name}(private_node_handle_, \"${topic_name}\")" find_comment_in_file "${aux_line}" "${node_c}" if [[ "${comment_found}" = "true" ]] then @@ -341,7 +341,7 @@ function create_action_server ################################################################################ #modify Node.cpp - line="${server_name}(public_node_handle_, \"${topic_name}\")" + line="${server_name}(private_node_handle_, \"${topic_name}\")" #check if ':' are needed comment="${class_name}::${class_name}(" diff --git a/libraries/create_client.sh b/libraries/create_client.sh index 1ebb01723883d4db9c713a96bb013d9ac4125861..a401786300bf94d78a0bafd95aae425fa333e40c 100755 --- a/libraries/create_client.sh +++ b/libraries/create_client.sh @@ -71,7 +71,7 @@ function check_client_attributes_functions fi # check the node.cpp file - line="${client_name} = this->public_node_handle_.serviceClient<${srv_pkg}::${srv_file}>(\"${topic_name}\");" + line="${client_name} = this->private_node_handle_.serviceClient<${srv_pkg}::${srv_file}>(\"${topic_name}\");" echo "${line}" find_comment_in_file "${line}" "${node_c}" if [[ "${comment_found}" = "true" ]] @@ -134,7 +134,7 @@ function create_client ################################################################################ #modify Node.cpp - line="${client_name} = this->public_node_handle_.serviceClient<${srv_pkg}::${srv_file}>(\"${topic_name}\");" + line="${client_name} = this->private_node_handle_.serviceClient<${srv_pkg}::${srv_file}>(\"${topic_name}\");" comment="\[init clients\]" add_line_to_file "\ \ ${line}\n" "${comment}" "${node_c}" diff --git a/libraries/create_publisher.sh b/libraries/create_publisher.sh index 0592145343190c902b539439cd15932593698d97..39645fccec23367c08dfdb58f0cb26eb7fce1856 100755 --- a/libraries/create_publisher.sh +++ b/libraries/create_publisher.sh @@ -136,7 +136,7 @@ function check_publisher_attributes_functions kill_exit "A message with the same name is already published in file ${node_c} line ${line_number}" fi else - line="this->${publisher_name} = this->public_node_handle_.advertise<${msg_pkg}::${msg_file}>(\"${topic_name}\", ${buffer});" + line="this->${publisher_name} = this->private_node_handle_.advertise<${msg_pkg}::${msg_file}>(\"${topic_name}\", ${buffer});" find_comment_in_file "${line}" "${node_c}" if [[ "${comment_found}" = "true" ]] then @@ -251,7 +251,7 @@ function create_publisher # modify Node.cpp # if [[ "${msg_file}" = "Image" ]] then - line="it(this->public_node_handle_)" + line="it(this->private_node_handle_)" find_comment_in_file "${line}" "${node_c}" if [[ "${comment_found}" = "false" ]] then @@ -317,7 +317,7 @@ function create_publisher line="${line}${aux_line}\n" aux_line="\ \ //std::string ${topic_name}_cal_file;" line="${line}${aux_line}\n" - aux_line="\ \ //public_node_handle_.param<std::string>(\"<cal_file_param>\",${topic_name}_cal_file,\"\");" + aux_line="\ \ //private_node_handle_.param<std::string>(\"<cal_file_param>\",${topic_name}_cal_file,\"\");" line="${line}${aux_line}\n" aux_line="\ \ //if(this->${topic_name}_camera_manager.validateURL(${topic_name}_cal_file))" line="${line}${aux_line}\n" @@ -359,7 +359,7 @@ function create_publisher comment="\[publish messages\]" add_line_to_file "\ \ ${line}" "${comment}" "${node_c}" else - line="this->${publisher_name} = this->public_node_handle_.advertise<${msg_pkg}::${msg_file}>(\"${topic_name}\", ${buffer});" + line="this->${publisher_name} = this->private_node_handle_.advertise<${msg_pkg}::${msg_file}>(\"${topic_name}\", ${buffer});" comment="\[init publishers\]" add_line_to_file " ${line}" "${comment}" "${node_c}" aux_line="// Uncomment the following line to publish the topic message" diff --git a/libraries/create_server.sh b/libraries/create_server.sh index 2bd88752eba7e3b64f4ac7871fe0ebea927e936c..fc7782fec1d81180182ebf9817134c0afa21d23b 100755 --- a/libraries/create_server.sh +++ b/libraries/create_server.sh @@ -99,7 +99,7 @@ function check_server_attributes_functions fi # check the node.cpp file - line="this->${server_name} = this->public_node_handle_.advertiseService(\"${topic_name}\", &${class_name}::${callback}, this);" + line="this->${server_name} = this->private_node_handle_.advertiseService(\"${topic_name}\", &${class_name}::${callback}, this);" find_comment_in_file "${line}" "${node_c}" if [[ "${comment_found}" = "true" ]] then @@ -192,7 +192,7 @@ function create_server ################################################################################ #modify Node.cpp - aux_line="this->${server_name} = this->public_node_handle_.advertiseService(\"${topic_name}\", &${class_name}::${callback}, this);" + aux_line="this->${server_name} = this->private_node_handle_.advertiseService(\"${topic_name}\", &${class_name}::${callback}, this);" line="\ \ ${aux_line}\n" aux_line="pthread_mutex_init(&this->${mutex_name},NULL);\n" line="${line}\ \ ${aux_line}" diff --git a/libraries/create_subscriber.sh b/libraries/create_subscriber.sh index 325f418ed2402f4d96e2079d22e6860b91600c77..892ad25face028db6f2443568c65159857268a7e 100755 --- a/libraries/create_subscriber.sh +++ b/libraries/create_subscriber.sh @@ -129,7 +129,7 @@ function check_subscriber_attributes_functions kill_exit "A subscriber with the same name is already subscribed in file ${node_c} line ${line_number}" fi else - line="this->${subscriber_name} = this->public_node_handle_.subscribe(\"${topic_name}\", ${buffer}, &${class_name}::${callback}, this);" + line="this->${subscriber_name} = this->private_node_handle_.subscribe(\"${topic_name}\", ${buffer}, &${class_name}::${callback}, this);" find_comment_in_file "${line}" "${node_c}" if [[ "${comment_found}" = "true" ]] then @@ -282,7 +282,7 @@ function create_subscriber # modify Node.cpp # if [[ "${msg_file}" = "Image" ]] then - line="it(this->public_node_handle_)" + line="it(this->private_node_handle_)" find_comment_in_file "${line}" "${node_c}" if [[ "${comment_found}" = "false" ]] then @@ -316,7 +316,7 @@ function create_subscriber aux_line="this->${subscriber_name} = this->it.subscribeCamera(\"${topic_name}/image_raw\", ${buffer}, &${class_name}::${callback}, this);" line="${aux_line}\n" else - aux_line="this->${subscriber_name} = this->public_node_handle_.subscribe(\"${topic_name}\", ${buffer}, &${class_name}::${callback}, this);" + aux_line="this->${subscriber_name} = this->private_node_handle_.subscribe(\"${topic_name}\", ${buffer}, &${class_name}::${callback}, this);" line="${aux_line}\n" fi aux_line="\ \ pthread_mutex_init(&this->${mutex_name},NULL);"