diff --git a/content/posts/GIT.md b/content/posts/GIT.md index bfcd06e..f7ea7a0 100644 --- a/content/posts/GIT.md +++ b/content/posts/GIT.md @@ -1,6 +1,6 @@ +++ -date="2023-02-17" +date="2023-03-14" author="spanskiduh" title="GIT" description="click to read about GIT" @@ -104,3 +104,19 @@ This will apply the remaining changes and complete the rebase process. If you encounter any issues during the rebase process, you can use the git rebase --abort command to abort the process and return your local branch to its original state. Once the rebase is complete, your local branch will contain the changes from the main Git branch, and your local commits will be replayed on top of them. You can then push your changes to your remote repository if needed. + + +## Deleted a commit and want to revive it + +### Firstly locate it +```bash +git fsck --full --no-reflogs --unreachable --lost-found | grep commit | cut -d " " -f 3 | xargs -n 1 git log -n 1 --pretty=oneline | grep "" +``` +Then checkout to the that commit hash. Good luck ;) + + +## Edit last commit message +```bash + git commit --amend + ``` + diff --git a/content/posts/ROS.md b/content/posts/ROS.md index b8a212b..f830494 100644 --- a/content/posts/ROS.md +++ b/content/posts/ROS.md @@ -1,12 +1,15 @@ +++ -date="2023-03-03" +date="2023-03-14" author="spanskiduh" title="ROS" description="click to read about ROS" +++ # ROS +### Run ros on any distro +[ROS-DOCKER](https://github.com/turlucode/ros-docker-gui) + ### Basic commands @@ -21,3 +24,43 @@ description="click to read about ROS" - `rostopic hz ` get frequency of messages. - `rosnode list` list all avaliable nodes. - `rosnode info ` get detailed information about the node. +- `rosparam list` list all available parameters +- `rosmsg info e.g. geometry_msgs/Twist` check the message structure. +- `rosbag record --duration=` record some topic +- `rosbag play ` replay the recorded topics (very usefull for debugging) + + +## RQT +It is basically gui for command tools +-> `topic monitor` gui topics + +### Compiled packages are not listed? +Re-source: `. ~/.bash.rc` or in docker container which uses zsh: `. ~/.zshrc`. + + + +### Launchfile + + +```xml + + # define node + + # Parameters for our nodes (basically constants) + # Use rosparam list to list them all + # Remap topic + + +``` + + +### CmakeLists.txt + + +```bash +# Here you add addidional packages: +- rospy: to compile with python libraries +- roscpp: ROs c++ compiler +- geometry_msgs: Useful structs for position estimation +find_package(catkin REQUIRED COMPONENTS rospy roscpp geometry_msgs) +```