waitForServer
Syntax
Description
waitForServer(
waits until the
service server is started up and available to receive requests. Press
Ctrl+C to cancel the wait.client
)
waitForServer(
specifies a timeout period in seconds using the name-value pair
client
,Timeout=timeoutperiod)Timeout=timeoutperiod
. If the service server does not start up in the
timeout period, this function displays an error and lets MATLAB® continue running the current program. The default value of
inf
prevents MATLAB from running the current program until the service client receives a service
response.
[
returns a status
,statustext
] = waitForServer(___)status
indicating whether the service server is available,
and a statustext
that captures additional information about the
status
, using any of the arguments from the previous syntaxes. If the
server is not available within the Timeout
, status
will be false
, and this function will not display an error.
Examples
Connect to a ROS network.
rosinit
Launching ROS Core... Status before launching ros core :0 result before launching ros core: 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571705 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571707 pts/3 S+ 0:00 grep -E ros|python Done in 0.50876 seconds. * Inside getProcessPID function * Process Name: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 Status before getting PID :0 Result before getting PID : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571730 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571732 pts/3 S+ 0:00 grep -E ros|python Result: 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 Status: 0 PID obtained: 571710 Status after getting PID :0 Result after getting PID : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571737 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571739 pts/3 S+ 0:00 grep -E ros|python * Exiting getProcessPID function * Status after launching ros core :0 result after launching ros core: 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571740 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571742 pts/3 S+ 0:00 grep -E ros|python Status before deleting node :0 Result before deleting node : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571743 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 597 -1 -mvmOutputPipe -1 609 571758 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571760 pts/3 S+ 0:00 grep -E ros|python Status after deleting node :0 Result after deleting node : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571764 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571766 pts/3 S+ 0:00 grep -E ros|python Initializing ROS master on http://172.20.144.70:52835. Initializing global node /matlab_global_node_24859 with NodeURI http://dcc959649glnxa64:37427/ and MasterURI http://localhost:52835.
Set up a service server. Use structures for the ROS message data format.
server = rossvcserver('/test', 'std_srvs/Empty', @exampleHelperROSEmptyCallback,... 'DataFormat','struct'); client = rossvcclient('/test','DataFormat','struct');
Check whether the service server is available. If it is, wait for the service client to connect to the server.
if(isServerAvailable(client)) [connectionStatus,connectionStatustext] = waitForServer(client) end
connectionStatus = logical
1
connectionStatustext = 'success'
Call service server with default message.
response = call(client)
response = struct with fields:
MessageType: 'std_srvs/EmptyResponse'
If the call
function above fails, it results in an error. Instead of an error, if you would prefer to react to a call failure using conditionals, return the status
and statustext
outputs from the call function. The status
output indicates if the call succeeded, while statustext
provides additional information.
numCallFailures = 0; [response,status,statustext] = call(client,"Timeout",3); if ~status numCallFailures = numCallFailues + 1; fprintf("Call failure number %d. Error cause: %s\n",numCallFailures,statustext) else disp(response) end
MessageType: 'std_srvs/EmptyResponse'
Shut down the ROS network.
rosshutdown
Shutting down global node /matlab_global_node_24859 with NodeURI http://dcc959649glnxa64:37427/ and MasterURI http://localhost:52835. Status before deleting node :0 Result before deleting node : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571767 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 597 -1 -mvmOutputPipe -1 609 571811 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571813 pts/3 S+ 0:00 grep -E ros|python Status after deleting node :0 Result after deleting node : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571818 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571820 pts/3 S+ 0:00 grep -E ros|python Shutting down ROS master on http://172.20.144.70:52835. Status before deleting core :0 Result before deleting core : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571710 pts/3 S 0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2974004_1596510/tp7ae2b024_15d5_467a_9010_85ca063d2592/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52835 -w 3 571722 pts/3 Sl 0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52835 -w 3 571821 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571823 pts/3 S+ 0:00 grep -E ros|python * Inside killProcessByPID function * PID of core to be killed: 571710 Status after Child Process Killed: 0 Result after Child Process Killed: Status after deleting core :0 Result after deleting core : 887 ? Ssl 17:13 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml 1157 ? Ssl 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal 568896 ? Ss 0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568926 ? S 0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2974004_1596510 COMPONENT=examples/ros ; cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/matlab/examples/ros ; //mathworks/hub/bat/common/bin/mw sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568927 ? S 0:00 sh ../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2974004/build.glnxa64.2974004.r000/examples/ros/build.glnxa64.2974004.r000.bml.1b2cf5d6e3975ccf240066d07cb1ec5c MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 568960 ? S 0:00 perl ../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab --display mwtools.liveCodeToDocbook ../../derived/glnxa64/examples/ros/mlx_to_docbook1.txt ../../derived/glnxa64/examples/ros examples/ros ../../help/examples/ros/glnxa64 //mathworks/hub/3rdparty/R2021a/6299939/glnxa64/pngquant 1 570388 ? Sl 0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros2server -mvmInputPipe 599 -1 -mvmOutputPipe -1 607 571828 pts/3 S+ 0:00 /bin/bash -c ps ax | grep -E 'ros|python' 571830 pts/3 S+ 0:00 grep -E ros|python * Exiting killProcessByPID function *
Create a sample ROS 2 network with two nodes.
node_1 = ros2node('node_1_service_server'); node_2 = ros2node('node_2_service_client');
Set up a service server and attach it to a ROS 2 node. Specify the callback function flipstring
, which flips the input string. The callback function is defined at the end of this example.
server = ros2svcserver(node_1,'/test','test_msgs/BasicTypes',@flipString);
Set up a service client of the same service type and attach it to a different node.
client = ros2svcclient(node_2,'/test','test_msgs/BasicTypes');
Wait for the service client to connect to the server.
[connectionStatus,connectionStatustext] = waitForServer(client)
connectionStatus = logical
1
connectionStatustext = 'success'
Create a request message based on the client. Assign the string to the corresponding field in the message, string_value
.
request = ros2message(client);
request.string_value = 'hello world';
Check whether the service server is available. If it is, send a service request and wait for a response. Specify that the service waits 3 seconds for a response.
if(isServerAvailable(client)) response = call(client,request,'Timeout',3); end
The response is a flipped string from the request message which you see in the string_value
field.
response.string_value
ans = 'dlrow olleh'
If the call
function above fails, it results in an error. Instead of an error, if you would prefer to react to a call failure using conditionals, return the status
and statustext
outputs from the call function. The status
output indicates if the call succeeded, while statustext
provides additional information.
numCallFailures = 0; [response,status,statustext] = call(client,request,"Timeout",3); if ~status numCallFailures = numCallFailues + 1; fprintf("Call failure number %d. Error cause: %s\n",numCallFailures,statustext) else disp(response.string_value) end
dlrow olleh
The callback function used to flip the string is defined below.
function resp = flipString(req,resp) % FLIPSTRING Reverses the order of a string in REQ and returns it in RESP. resp.string_value = fliplr(req.string_value); end
Input Arguments
ROS or ROS 2 service client, specified as a ros.ServiceClient
or
ros2serviceclient
object handle, respectively. This service client
enables you to send requests to the service server.
Output Arguments
Status of the service server start up, returned as a logical
scalar. If the server is not available within the timeout period,
status
will be false
.
Note
Use the status
output argument when you use waitForServer for code
generation. This will avoid runtime errors and outputs the status instead, which can be
reacted to in the calling code.
Status text associated with the service call status, returned as one of the following:
'success'
— The server is available.'input'
— The input to the function is invalid.'timeout'
— The server did not become available before the timeout period expired.
Extended Capabilities
Usage notes and limitations:
Supported only for the Build Type,
Executable
.Usage in MATLAB Function block is not supported.
Version History
Introduced in R2021b
MATLAB Command
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
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.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)