From e4d88b09f26d6addd96cb98e5585b521850c8852 Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Fri, 4 Sep 2020 13:35:08 -0700 Subject: [PATCH] small tutorials fixes (#92) Signed-off-by: John Shepherd Signed-off-by: Michael Carroll --- profiler/src/RemoteryProfilerImpl.cc | 2 +- tutorials/profiler.md | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/profiler/src/RemoteryProfilerImpl.cc b/profiler/src/RemoteryProfilerImpl.cc index 85d4eb30d..c78bdf0a9 100644 --- a/profiler/src/RemoteryProfilerImpl.cc +++ b/profiler/src/RemoteryProfilerImpl.cc @@ -184,7 +184,7 @@ RemoteryProfilerImpl::RemoteryProfilerImpl() static_cast(_context)->HandleInput(_text); }; - igndbg << "Staring ign-common profiler impl: Remotery" << + igndbg << "Starting ign-common profiler impl: Remotery" << " (port: " << this->settings->port << ")" << std::endl; rmtError error; error = rmt_CreateGlobalInstance(&this->rmt); diff --git a/tutorials/profiler.md b/tutorials/profiler.md index 65e06eddc..d6f8fd926 100644 --- a/tutorials/profiler.md +++ b/tutorials/profiler.md @@ -113,6 +113,11 @@ When compiling with ``colcon``: colcon build --cmake-args -DENABLE_PROFILER=1 ``` +Run your Ignition library then open the profiler browser using: +``` +ign_remotery_vis +``` + If the profiler is run successfully, you should see output in a browser. Similar to this @@ -120,13 +125,13 @@ If the profiler is run successfully, you should see output in a browser. Similar ### Troubleshoot the web viewer If you see ``connection error``, there are a couple of things to double check -1. Was the profiler enabled when the project you're trying to run was compiled? Note that this isn't the case if you installed Ignition libraries from binaries, for example. You need to compile the project from source with the ENABLE_PROFILER variable set. -2. Are you using the correct port number in the upper left corner ``Connection Addresss: ws://127.0.0.1:1500/rmt``? Run ``ign gazebo -v 4`` to show the port number in use. The port number will be printed out if the profiler is enabled. +1. Was the profiler enabled when the project you're trying to run was compiled? Note that this isn't the case if you installed Ignition libraries from binaries, for example. You need to compile the project from source with the `ENABLE_PROFILER` variable set. +2. Are you using the correct port number in the upper left corner ``Connection Addresss: ws://127.0.0.1:1500/rmt``? Running ``ign gazebo -v 4`` will show the port number in use near the top of the outputted text. The port number will be printed out if the profiler is enabled. ```{.sh} - [Dbg] [RemoteryProfilerImpl.cc:187] Staring ign-common profiler impl: Remotery (port: 1500) + [Dbg] [RemoteryProfilerImpl.cc:187] Starting ign-common profiler impl: Remotery (port: 1500) ``` -3. Are you running the program in a separate terminal? Profiler only establishes connection if there is a program runing and being actively profiled. +3. Are you running the program in a separate terminal? The profiler only establishes connection if there is a program running and being actively profiled. 4. If you want to use a different port, configure the environment variable `RMT_PORT` by running the following in terminal, and update the web viewer port in your browser accordingly (see 2 above) ```{.sh}