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 / controlling_usb_relay_using_ubuntu.md
Last active May 27, 2021 06:56
Controlling USB-Relay using Ubuntu
@agutenkunst
agutenkunst / gist:0ed3e1e57e25ad24b8e003aee2f55732
Last active December 15, 2020 10:10
ROS Noetic Read Image from Android Camera
# Camera Topic from Android Phone
Package: https://github.com/ros-drivers/video_stream_opencv
```
roslaunch video_stream_opencv camera.launch video_stream_provider:="http://192.168.0.178:4747/video"
```
On Android: https://play.google.com/store/apps/details?id=com.dev47apps.droidcam
Worked!
@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
@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 / 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 / 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 / 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)
alias.find-svn-revision=!git log --name-status --grep "git-svn-id.*@$1" #