Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Remotery tutorials fixes #92

Merged
merged 1 commit into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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