Skip to content

Instantly share code, notes, and snippets.

View ejalaa12's full-sized avatar

El Jawad Alaa ejalaa12

View GitHub Profile
@ejalaa12
ejalaa12 / ros2_pub_from_yaml.md
Created July 26, 2023 10:19
publish ros2 msg from yaml file

Instead of typing the whole message content in command line, you can set the content in a yaml file

: msg.yaml :

x: 1.0
y: 2.0
z: 3.0

and then pass the file to the ros2 command line.

PureRef: a board to add images when doing design
PyCharm: IDE for Python
CLion: IDE for CLion
Spyder: IDE for Python - Matlab like
Variety: A WallPaper changer
@ejalaa12
ejalaa12 / cheatsheet.md
Created March 26, 2020 12:42
Gazebo xacro urdf sdf erb cheatsheet

URDF -> SDF

gz sdf -p file.urdf > file.sdf

SDF -> URDF

rosrun pysdf sdf2urdf.py file.sdf file.urdf

ERB -> SDF

@ejalaa12
ejalaa12 / pool_tiles.py
Last active May 10, 2019 12:05
Generate Pool tiles using Numpy
#!/usr/bin/env python
import numpy as np
def _hex_to_rgb(hex_str):
"""
Converts hex str to r, g, b
Asserts that hex_str has a {RRGGBB} format
"""
r, g, b = hex_str[:2], hex_str[2:4], hex_str[4:]
rgb = [int(n, base=16) for n in (r,g,b)]
@ejalaa12
ejalaa12 / chessboard.jpg
Last active May 6, 2019 14:04
Trying to understand RViz mesh color bug
chessboard.jpg
@ejalaa12
ejalaa12 / Readme.md
Created December 11, 2018 11:19
Publishers in rospy can't be unregistered without errors

Report

Description

When calling pub.unregister we get warning messages that look like that:

[WARN] [1544525264.664350]: Could not process inbound connection: [/pub_bug] is not a publisher of [/topic2]. Topics are [['/rosout', 'rosgraph_msgs/Log']]{'message_definition': 'string data\n', 'callerid': '/pub_bug', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/topic2', 'type': 'std_msgs/String'}

This script tries to reproduce the error in various conditions to locate where the issue comes from

Experimemts

Liste de materiel

Systeme sur le zodiac

  • attache volant
  • risants
  • enrouleurs 1
  • boute
  • enrouleur 2
  • piece imprimee
@ejalaa12
ejalaa12 / .mdown
Created December 28, 2016 19:00
Key binding for zsh

Run cat then press keys to see the codes your shortcut send.
(Press Ctrl+C to kill the cat when you're done.)
For me, (ubuntu, konsole, xterm) pressing Alt + <- sends ^[[1;3D, so i would put in my .zshrc

bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word

(Actually I prefer to use Ctrl + arrow to move word by word, like in a normal textbox under windows or linux gui.)

Related question: http://stackoverflow.com/questions/8638012