... | ... | @@ -70,19 +70,23 @@ touch src/<project>/CATKIN_IGNORE |
|
|
## Useful scripts
|
|
|
### Open catkin_ws and source setup.bash
|
|
|
```
|
|
|
cd ~/kamaro/catkin_ws
|
|
|
source devel/setup.bash
|
|
|
function kcw() {
|
|
|
cd ~/kamaro/catkin_ws
|
|
|
source devel/setup.bash
|
|
|
}
|
|
|
```
|
|
|
Put this into `/usr/local/bin/kcw` for example.
|
|
|
Then you can go to the workspace and set up the environment using `source kcw` or shorter `. kcw`
|
|
|
Append this into your `~/.bashrc`.
|
|
|
Then you can go to the workspace and set up the environment using `kcw`.
|
|
|
|
|
|
### Set the ROS master to connect to the robot
|
|
|
```
|
|
|
export ROS_MASTER_URI=http://192.168.1.42:11311
|
|
|
export ROS_IP=`ip a| sed -En 's/.*inet (addr:)?(192.([0-9]*\.){2}[0-9]*).*/\2/p'` # This forces ROS to identify this computer using its IP instead of the hostname which the robot cannot resolve
|
|
|
function btr() {
|
|
|
export ROS_MASTER_URI=http://192.168.1.42:11311
|
|
|
export ROS_IP=`ip a| sed -En 's/.*inet (addr:)?(192.([0-9]*\.){2}[0-9]*).*/\2/p'` # This forces ROS to identify this computer using its IP instead of the hostname which the robot cannot resolve
|
|
|
}
|
|
|
```
|
|
|
Put this into `/usr/local/bin/btr` for example.
|
|
|
Then you can connect to the robot using `source btr` or shorter `. btr`
|
|
|
Append this into your `~/.bashrc`.
|
|
|
Then you can connect to the robot using `btr`.
|
|
|
|
|
|
## Recording
|
|
|
[record and playback](recording)
|
... | ... | |