del(ptree,paramname) deletes
a parameter with name paramname from the parameter
tree, ptree. The parameter is also deleted from
the ROS parameter server. If the specified paramname does
not exist, the function displays an error.
Connect to the ROS network. Create a parameter tree and a 'MyParam' parameter. Check that the parameter exists.
rosinit
Launching ROS Core...
Done in 0.47258 seconds.
Initializing ROS master on http://172.20.222.142:57583.
Initializing global node /matlab_global_node_89017 with NodeURI http://dcc2548638glnxa64:39307/ and MasterURI http://localhost:57583.
Delete the parameter. Verify it was deleted. Shut down the ROS network.
del(ptree,'MyParam')
has(ptree,'MyParam')
ans = logical
0
rosshutdown
Shutting down global node /matlab_global_node_89017 with NodeURI http://dcc2548638glnxa64:39307/ and MasterURI http://localhost:57583.
Shutting down ROS master on http://172.20.222.142:57583.
Parameter tree, specified as a ParameterTree object
handle. Create this object using the rosparam function.
ROS parameter name, specified as a string scalar or character vector. This string must match
the parameter name exactly.
ROS parameter namespace, specified as a string scalar or character vector. All parameter names
starting with this string are listed when calling
rosparam("list",namespace).
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.