Skip to content

Commit

Permalink
small tutorials fixes (#92)
Browse files Browse the repository at this point in the history
Signed-off-by: John Shepherd <[email protected]>
  • Loading branch information
John Shepherd authored and mjcarroll committed Oct 14, 2020
1 parent 311ff5c commit f8753b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion profiler/src/RemoteryProfilerImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ RemoteryProfilerImpl::RemoteryProfilerImpl()
static_cast<RemoteryProfilerImpl *>(_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);
Expand Down
13 changes: 9 additions & 4 deletions tutorials/profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,25 @@ 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

<img src="https://raw.githubusercontent.com/ignitionrobotics/ign-common/ign-common3/tutorials/imgs/profiler_tutorial_example.png">

### 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}
Expand Down

0 comments on commit f8753b3

Please sign in to comment.