Main Content

Write A ROS Image Message In Simulink

This example shows how to write an image message and publish it to a ROS network in Simulink®.

Start a ROS network.

rosinit
Launching ROS Core...
Status before launching ros core :0
result before launching ros core:     879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32809 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  32811 pts/4    S+     0:00 grep -E ros|python

Done in 1.0167 seconds.
* Inside getProcessPID function *
Process Name: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
Status before getting PID :0
Result before getting PID :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32904 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  32906 pts/4    S+     0:00 grep -E ros|python

Result:   32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3

Status: 0
PID obtained: 32831
Status after getting PID :0
Result after getting PID :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32911 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  32913 pts/4    S+     0:00 grep -E ros|python

* Exiting getProcessPID function *
Status after launching ros core :0
result after launching ros core:     879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32914 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  32916 pts/4    S+     0:00 grep -E ros|python

Status before deleting node :0
Result before deleting node :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32917 ?        Sl     0:00 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 583 -1 -mvmOutputPipe -1 590
  32932 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  32934 pts/4    S+     0:00 grep -E ros|python

Status after deleting node :0
Result after deleting node :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32941 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  32943 pts/4    S+     0:00 grep -E ros|python

Initializing ROS master on http://172.20.145.238:52087.
Initializing global node /matlab_global_node_74187 with NodeURI http://dcc098039glnxa64:45521/ and MasterURI http://localhost:52087.

Load a sample image. Create a subscriber to receive a ROS Image message on the /image topic. Specify the message type as sensor_msgs/Image and the data format as struct.

exampleHelperROSLoadImageData
sub = rossubscriber("/image","sensor_msgs/Image",DataFormat="struct");

Open the Simulink® model for writing and publishing ROS Image message.

open_system("write_image_example_model.slx");

Ensure that the Publish block is publishing to the /image topic. Under the Simulation tab, select ROS Toolbox > Variable Size Arrays and verify the Data array has a maximum length greater than the length of the Data field in img (921,600).

The model writes the input img to a ROS Image message. Using a Header Assignment block, the frame ID of the message header is set to /camera_depth_optical_frame.

Run the model to publish the message.

sim("write_image_example_model.slx");
Status before deleting node :0
Result before deleting node :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32944 ?        Sl     0:03 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 583 -1 -mvmOutputPipe -1 590
  33111 ?        Sl     0:02 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 687 -1 -mvmOutputPipe -1 690
  33259 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  33261 pts/4    S+     0:00 grep -E ros|python

Status after deleting node :0
Result after deleting node :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32944 ?        Sl     0:03 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 583 -1 -mvmOutputPipe -1 590
  33111 ?        Sl     0:02 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 687 -1 -mvmOutputPipe -1 690
  33262 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  33264 pts/4    S+     0:00 grep -E ros|python

The image message is published to the ROS network and received by the subscriber created earlier. You can use the rosReadImage function to retrieve the image in a format that is compatible with MATLAB.

imageFormatted = rosReadImage(sub.LatestMessage);

The sample image has an rgb8 encoding. By default, rosReadImage returns the image in a standard 480-by-640-by-3 uint8 format. View this image using the imshow function.

figure
imshow(imageFormatted)

Close the model and shut down the ROS network.

close_system("write_image_example_model.slx",0);
rosshutdown
Shutting down global node /matlab_global_node_74187 with NodeURI http://dcc098039glnxa64:45521/ and MasterURI http://localhost:52087.
Status before deleting node :0
Result before deleting node :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  32944 ?        Sl     0:03 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/bin/glnxa64/libmwros1server -mvmInputPipe 583 -1 -mvmOutputPipe -1 590
  33418 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  33420 pts/4    S+     0:00 grep -E ros|python

Status after deleting node :0
Result after deleting node :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  33449 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  33451 pts/4    S+     0:00 grep -E ros|python

Shutting down ROS master on http://172.20.145.238:52087.
Status before deleting core :0
Result before deleting core :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  32831 pts/4    S      0:00 bash /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/toolbox/ros/mlroscpp/util/+ros/+internal/runroscmd.sh   /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1 /tmp/Bdoc25a_2864802_2637713/tp4f6bb99f_f7de_4268_a9d4_4b8b98c13c2b/ros1/glnxa64/venv /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/bin/glnxa64 rosmaster --core -p 52087 -w 3
  32871 pts/4    Sl     0:00 python3 /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab/sys/ros1/glnxa64/ros1/bin/rosmaster --core -p 52087 -w 3
  33452 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  33454 pts/4    S+     0:00 grep -E ros|python

* Inside killProcessByPID function *
PID of core to be killed: 32831
Status after Child Process Killed: 0
Result after Child Process Killed: 
Status after deleting core :0
Result after deleting core :    879 ?        Ssl    0:41 /usr/bin/python3 /usr/bin/mta-sts-daemon --config /etc/mta-sts-daemon.yml
   1500 ?        Ssl    0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
  30606 ?        Ss     0:00 /bin/sh /usr/bin/xvfb-run -a -s -screen 0 1280x1024x24 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30636 ?        S      0:00 /bin/sh -c export TMPDIR=/tmp/Bdoc25a_2864802_2637713 COMPONENT=examples/ros ;   cd /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/matlab/examples/ros/html ; //mathworks/hub/bat/common/bin/mw   sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30637 ?        S      0:00 sh ../../../tools/build_using_mlpath/mlenv --use-scoped-paths 1 --scoped-cppms-file /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0/scoped_cppms_modules.txt --scoped-cppms-envvar MW_SCOPED_CPPMICROSERVICES_MODULES --tag bml --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --paths /mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MATLAB_LOG_DIR=/mathworks/devel/bat/Bdoc25a/logs/2864802/build.glnxa64.2864802.r001/examples/ros/build.glnxa64.2864802.r001.bml.b27ce1f56c7c88b867133d20b65593f0 MAKEFLAGS= DISPLAY=:0 MESA_BACK_BUFFER=Pixmap perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  30670 ?        S      0:00 perl ../../../tools/build_using_matlab/mlrun --verbose --runnable /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2864802/build/runnable/matlab --display ../../../derived/glnxa64/examples/ros/html/matlab_build_script/publish_examples0.m
  33460 pts/4    S+     0:00 /bin/bash -c ps ax | grep -E 'ros|python'
  33462 pts/4    S+     0:00 grep -E ros|python

* Exiting killProcessByPID function *