Skip to content

H cheatsheet

Ernő Horváth edited this page Oct 29, 2024 · 19 revisions

Cheatsheet

Important

Cheat sheets

rsync

Hálózatba kötött gépek közötti másolás, pl a jetsonról a saját gépünk /mnt/c/bag/ mappájába történő másolás progress-barral:

rsync -avzh --progress nvidia@192.168.1.5:/mnt/storage_1tb/2021-07-02/ /mnt/c/bag/2021-07-02/

aliases

cd ~; wget https://raw.githubusercontent.com/jkk-research/jkk_utils/ros2/.bash_aliases
cd ~; rm .bash_aliases; wget https://raw.githubusercontent.com/jkk-research/jkk_utils/ros2/.bash_aliases
$ cat ~/.bash_aliases
# some more ls aliases for JKK, Szenergy and friends
alias r2='source ~/ros2_ws/install/setup.bash && echo "source ~/ros2_ws/install/setup.bash"'
alias aw='source ~/autoware/install/setup.bash && echo "source ~/autoware/install/setup.bash"'
alias f1='source ~/f1tenth_ws/install/setup.bash && echo "source ~/f1tenth_ws/install/setup.bash"'
alias r1='screen -mdS roscore1 bash -c 'roscore' && echo "screen roscore1"'

rosbag record

Wiki

Pl packet végű, clouddal kezdődő topicokon kívül minden mentése, nagy buffer size mellett:

rosbag record -a -O szurt_adatok.bag -x "(.*)_packets|cloud(.*)" -b 4096

rosbag play

Wiki

Loopolva, rendszeridős szerint hirdetett timestampekkel:

rosparam set use_sim_time true
rosbag play valami.bag --clock -l

relay

Wiki

Topic lemásolása egy másik topiccá:

rosrun topic_tools relay /cloud_pcd /left_os1/os1_cloud_node/points

ntp

sudo apt install ntp
sudo apt-get install ntpdate
sudo ntpdate ntp.ubuntu.com

nmap

nmap 192.168.1.0-255

screen

start new named screen session:

screen -m -d -S roscore bash -c roscore
screen -m -d -S campfly bash -c 'roslaunch drone_bringup campus_fly.launch'
screen -m -d -S rviz1 bash -c 'rosrun rviz rviz'

További példák shell scriptként itt: https://github.com/szenergy/demo_shell_scipts

  • list screen: screen -ls
  • restore screen: screen -r roscore / screen -r campfly / screen -r rviz1
  • detach: Ctrl-a + Ctrl-d
  • kill: killall -9 screen and screen -wipe

nmtui

nmtui

desktop icon

[Desktop Entry]
Version=1.0
Exec=bash -c "source /opt/ros/melodic/setup.bash;source ~/catkin_ws/devel/setup.bash;roslaunch szemission_bringup rviz_tablet_parking.launch"
Name=parking RVIZ
GenericName=rviz parking
Comment=roslaunch stuff
Icon=/usr/share/icons/Humanity-Dark/status/48/gpm-battery-charged.svg
Encoding=UTF-8
Terminal=true
Type=Application
Categories=Application;Network;

WLS issues

if rqt does not work try to edit:

code ~/.config/ros.org/rqt_gui.ini

https://answers.ros.org/question/251876/cant-run-rqt-after-removing-plugin-package/

Clone this wiki locally