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.47919 seconds.
Initializing ROS master on http://172.20.149.13:53133.
Initializing global node /matlab_global_node_16892 with NodeURI http://dcc158922glnxa64:42229/ and MasterURI http://localhost:53133.
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_16892 with NodeURI http://dcc158922glnxa64:42229/ and MasterURI http://localhost:53133.
Shutting down ROS master on http://172.20.149.13:53133.
ptree — Parameter tree ParameterTree object handle
Parameter tree, specified as a ParameterTree object
handle. Create this object using the rosparam function.
paramname — ROS parameter name string scalar | character vector
ROS parameter name, specified as a string scalar or character vector. This string must match
the parameter name exactly.
namespace — ROS parameter namespace string scalar | character vector
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).
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.