master
Gašper Spagnolo 2023-03-14 09:08:54 +01:00
parent 41dc31fc91
commit 14ce208163
2 changed files with 61 additions and 2 deletions

View File

@ -1,6 +1,6 @@
+++ +++
date="2023-02-17" date="2023-03-14"
author="spanskiduh" author="spanskiduh"
title="GIT" title="GIT"
description="click to read about 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. 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. 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 "<commit-message>"
```
Then checkout to the that commit hash. Good luck ;)
## Edit last commit message
```bash
git commit --amend
```

View File

@ -1,12 +1,15 @@
+++ +++
date="2023-03-03" date="2023-03-14"
author="spanskiduh" author="spanskiduh"
title="ROS" title="ROS"
description="click to read about ROS" description="click to read about ROS"
+++ +++
# ROS # ROS
### Run ros on any distro
[ROS-DOCKER](https://github.com/turlucode/ros-docker-gui)
### Basic commands ### Basic commands
@ -21,3 +24,43 @@ description="click to read about ROS"
- `rostopic hz <topic>` get frequency of messages. - `rostopic hz <topic>` get frequency of messages.
- `rosnode list` list all avaliable nodes. - `rosnode list` list all avaliable nodes.
- `rosnode info <node>` get detailed information about the node. - `rosnode info <node>` get detailed information about the node.
- `rosparam list` list all available parameters
- `rosmsg info <message> e.g. geometry_msgs/Twist` check the message structure.
- `rosbag record <topic> --duration=<X in seconds>` record some topic
- `rosbag play <topic_file>` 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
<launch>
<node pkg="turtlesim" type="turtlesim_node" name="turtlesim_node" output="screen"/> # define node
<node pkg="exercise2" type="pubvel" name="pubvel" output="screen">
<param name="scale_linear" value="1" type="double"/> # Parameters for our nodes (basically constants)
<param name="scale_angular" value="4" type="double"/> # Use rosparam list to list them all
<remap from="cmd_vel" to="/turtle1/cmd_vel" /> # Remap topic
</node>
</launch>
```
### 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)
```