Skip to content

Instantly share code, notes, and snippets.

View agutenkunst's full-sized avatar
🤓
Robot goes brrrrrrrrr

Alexander Gutenkunst agutenkunst

🤓
Robot goes brrrrrrrrr
View GitHub Profile
@agutenkunst
agutenkunst / install_psen_scan_on_raspberry.md
Last active December 11, 2019 13:41
Setup psen_scan on RaspberryPi

Prepare

sudo apt-get update sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential

PythonQt needs to be installed (not sure why not via depend)

sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools

Initialize rosdep

sudo rosdep init rosdep update

@agutenkunst
agutenkunst / gist:b78f656392a3e67f0b8220dfc0913eeb
Created January 14, 2020 08:47
Send notification via notify-send with crontab cronjob and Ubuntu 18.04
* * * * * eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)"; /usr/bin/notify-send "Foo"
source: https://askubuntu.com/a/346580
@agutenkunst
agutenkunst / ccache_install.md
Last active November 25, 2020 12:01
Setup ccache

Run

sudo apt install ccache -y
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
source ~/.bashrc

If there is a error containing something like

ccache: error: Failed to create temporary file for /home/alex/.ccache/tmp/tmp.cpp_stderr: Permission denied
alias.find-svn-revision=!git log --name-status --grep "git-svn-id.*@$1" #
@agutenkunst
agutenkunst / presentation.md
Last active May 19, 2020 13:17
Code Coverage für pytest mit ROS

Code Coverage für pytest mit ROS

Goal

Create coverage for pytest using ROS

How is this working with unittests?

A python unittest is added to the CMakeLists.txt using

catkin_add_nosetests(unittest.py)
@agutenkunst
agutenkunst / description.md
Last active June 10, 2020 07:38
Run Modbus Tests with Server using pymodbus

Install requirements

sudo apt-get install python3-pymodbus (maybe python2 also works, but I didn't check)

Run

Server Code

(see modbus_server.py)

Client code

(see modbus_client.py)

@agutenkunst
agutenkunst / gist:d0ee60a35e76f77e8c938ff88fcf089c
Last active July 7, 2020 13:46
Show cmake target dependency graph
```
cmake src/<package_name>/ --graphviz=foo.dot
xdot foo.dot
```
Set options for better exclude by adding a file src/<package_name>/CMakeGraphVizOptions.cmake with
```
set(GRAPHVIZ_EXTERNAL_LIBS FALSE)
set(GRAPHVIZ_IGNORE_TARGETS "gtest;gmock;unittest*;integrationtest*")
```
@agutenkunst
agutenkunst / 00sourcetrail_ros_instructions.md
Last active September 5, 2022 07:48
Use Sourcetrail with ROS

Use Sourcetrail with ROS

1. Build your workspace with the required cmake flag

Building your workspace with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON which will create a file compile_commands.json in your build/<pkg> directory containing all compiler calls.

colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

2. Add the project to sourcetrail

See images below

@agutenkunst
agutenkunst / main.cpp
Created December 10, 2020 11:11
Boost Asio get local ip address
#include <iostream>
#include <boost/asio.hpp>
using boost::asio::ip::udp;
// Build using g++ main.cpp -L /usr/include/boost -pthread
int main(int argc, char* argv[])
{
try