tutorials:general

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:general [2022/03/23 10:55] johanotutorials:general [2022/09/02 14:04] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Tutorials on ROS/SkiROS ======
 +
 +
 skiros2_examples give some basic introduction to SkiROS (https://github.com/rvmi/skiros2_examples). Clone into catkin_ws skiros2_examples give some basic introduction to SkiROS (https://github.com/rvmi/skiros2_examples). Clone into catkin_ws
 /src /src
Line 18: Line 21:
  
 '' ''
-export HISTTIMEFORMAT="%h %d %H:%M:%S " +export HISTTIMEFORMAT="%h %d %H:%M:%S " \\ 
-export HISTSIZE=10000 +export HISTSIZE=10000 \\ 
-export HISTFILESIZE=10000 +export HISTFILESIZE=10000 \\ 
-export HISTIGNORE="ls:ps:history" +export HISTIGNORE="ls:ps:history" \\ 
-shopt -s histappend  +shopt -s histappend \\ 
-PROMPT_COMMAND="history -a;$PROMPT_COMMAND"+PROMPT_COMMAND="history -a;$PROMPT_COMMAND" \\
 '' ''
  
Line 30: Line 33:
  
 '' ''
-export ROS_WS=~/Workspaces/heron_ws +export ROS_WS=~/Workspaces/heron_ws \\ 
-source $ROS_WS/devel/setup.bash +source $ROS_WS/devel/setup.bash \\ 
-alias src='cd $ROS_WS/src' +alias src='cd $ROS_WS/src' \\ 
-export CURRENT_CMAKE_BUILD_DIR="(catkinlocateworkspaceROS_WS --build)" +export CURRENT_CMAKE_BUILD_DIR="(catkinlocateworkspaceROS_WS --build)" \\ 
- +\\ 
-function print_ros_variables () { +function print_ros_variables () { \\ 
-        echo "ROS_MASTER_URI: " $ROS_MASTER_URI +        echo "ROS_MASTER_URI: " $ROS_MASTER_URI \\ 
-        echo "ROS_HOSTNAME: " $ROS_HOSTNAME +        echo "ROS_HOSTNAME: " $ROS_HOSTNAME \\ 
-        echo "ROS_IP: " $ROS_IP +        echo "ROS_IP: " $ROS_IP \\ 
-        echo "ROS Workspace: " $ROS_WS +        echo "ROS Workspace: " $ROS_WS \\ 
-        echo "rosinstall file: " `test -f ROS_WS/src/.rosinstall.conf && catROS_WS/src/.rosinstall.conf` +        echo "rosinstall file: " `test -f ROS_WS/src/.rosinstall.conf && catROS_WS/src/.rosinstall.conf` \\ 
-+\\ 
-print_ros_variables+print_ros_variables \\
 '' ''
  
Line 48: Line 51:
 Add this to your ''.bashrc '': Add this to your ''.bashrc '':
  
- +''export ROS_IP=192.168.100.5 \\ 
-''export ROS_IP=192.168.100.5'' +export ROS_MASTER_URI='[[http://$ROS_IP:11311]]' \\ 
-''export ROS_MASTER_URI''=http://$ROS_IP:11311 +''
  
 ===Configure Master Way 2 - Flexible === ===Configure Master Way 2 - Flexible ===
 +
 Add this to your ''.bashrc'': Add this to your ''.bashrc'':
  
 '' ''
-alias ros_master_local="export ROS_MASTER_URI='http://127.0.0.1:11311' && export ROS_IP='127.0.0.1' && unset ROS_HOSTNAME && print_ros_variables" +alias ros_master_local="export ROS_MASTER_URI='http://127.0.0.1:11311' && export ROS_IP='127.0.0.1' && unset ROS_HOSTNAME && \\ print_ros_variables" \\ 
-alias ros_master_remote="export ROS_MASTER_URI='http://192.168.100.5:11311' && export ROS_IP='192.168.100.10' && unset ROS_HOSTNAME && print_ros_variables" +alias ros_master_remote="export ROS_MASTER_URI='http://192.168.100.5:11311' && export ROS_IP='192.168.100.10' && unset ROS_HOSTNAME && print_ros_variables" \\ 
-ros_master_local+ros_master_local \\
 '' ''
  
Line 68: Line 71:
 alias resource="source ~/.bashrc" alias resource="source ~/.bashrc"
 '' ''
-## Automatically open a tmux session when connecting through ssh+===Automatically open a tmux session when connecting through ssh===
 Add this to your ''.bashrc'': Add this to your ''.bashrc'':
 '' ''
-if [[ -z "TMUX" ]] && [ "SSH_CONNECTION" != "" ]; then +if [[ -z "TMUX" ]] && [ "SSH_CONNECTION" != "" ]; then  \\ 
-    tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux +    tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux \\ 
-fi+fi  \\
 '' ''
  
-## Add SSH keys to a keyring for multiple shells+===Add SSH keys to a keyring for multiple shells===
 This frees you from typing the password of your ssh key every time. This frees you from typing the password of your ssh key every time.
  
  • tutorials/general.1648032919.txt.gz
  • Last modified: 2022/09/02 14:04
  • (external edit)