AD‐EYE Commands cheat sheet - AD-EYE/AD-EYE_Core GitHub Wiki

AD-EYE Commands cheat sheet


GIT COMMANDS LIST :

DELETING / MOVING / RENAMING

  • git reset {file} : Remove file from index but keep modification in workspace
  • git reset --hard HEAD : Reset all not commited changes
  • git clean -fd : Delete untracked files
  • git checkout -- : Delete local modification but not untracked files
  • git revert {commit} : Create new commit that reverts modification of specified commit
  • git rm : Remove file from workspace and git index
  • git mv {old} {new} : Move or rename file
  • git tag {name} : Create new tag for current commit

COMMIT

  • git add {file} : Add one file to be commited
  • git add -A : Add all files to be commited
  • git commit -m "message" : New commit (all staged changes)
  • git log : History of all previous commits
  • git diff : Differences between current changes and index
  • git diff --cached : Differences between new added changes and last commit

BRANCH

  • git checkout {branchname} : Change branch
  • git checkout -b {branchname} : Create new branch and change to it
  • git branch : See all local branches
  • git branch -r : See all remote branches
  • git branch -a : See all local and remote branches
  • git branch -d {branchname} : Delete specified branch
  • git branch -D {branchname} : Force deleting specified branch
  • git show-branch --all : See all branches with more infos
  • git merge {branchname} : Merge {branchname} into the current one

USUAL

  • git help : Git wiki for help
  • git status : Current file status
  • git pull : Pull all new change on the branch
  • git push origin {branchname} : Push commited change
  • git push -u origin {newbranch} : Push for the first time a new branch

STASH

  • git stash : Save current local modifications in a temporary stash
  • git stash apply : Reapply modification from the stash

REPO

  • git remote -v : List all remote repos
  • git remote add {name} {url} : Add new remote repo
  • git fetch : Get all modification from remote repo without merging them automaticaly

SETTINGS

  • git config --global user.name "name" : Setting user git name
  • git config --global user.email "email" : Setting user git email

Notes :

  • Never use:
    • git add *
    • the force, -f, option with push
  • Avoid using:
    • git add -a
    • git add .

Always make sure you know what you are staging (git add) and committing (git commit). In case of doubt use git status and, eventually, go back to the git tutorial.

Make sure to pull the dev/main/master branch before merging, and create pull requests for merging larger features.

The most common git commands are represented in the next diagram:

  • Some other commands can be found here
  • A tutorial about git can be found Here

ROS Commands list :

BASIC

  • roscore : Starts the ROS master, which is necessary for ROS nodes to communicate
  • rosrun [package] [node] : Runs a specific node from a package
  • roslaunch [package] [launchfile] : Launches ROS master and multiple nodes defined in a launch file
  • rosnode list : Lists all active nodes
  • rosnode info [node] : Displays information about a specific node

TOPICS

  • rostopic list : Lists all active topics
  • rostopic info [topic] : Displays information about a specific topic
  • rostopic echo [topic] : Displays messages published to a specific topic
  • rostopic pub [topic] [msg_type] [args] : Publishes a message to a specific topic / options : -1 for publishing once, -r for publishing continuously with a given rate (see rostopic pub --help for more info)

SERVICES

  • rosservice list : Lists all active services
  • rosservice info [service] : Displays information about a specific service
  • rosservice call [service] [args] : Calls a service with specific arguments
  • rosmsg show [msg_type] : Displays the structure of a message type
  • rossrv show [srv_type] : Displays the structure of a service type

PARAMS

  • rosparam list : Lists all parameters on the parameter server
  • rosparam get [param] : Retrieves the value of a specific parameter
  • rosparam set [param] [value] : Sets the value of a specific parameter

VISUALIZATION / DEBUG

  • rqt_graph : Opens a graphical interface to visualize nodes, topics, and services
  • rqt_console : Opens a graphical interface to visualize node logs
  • rqt_logger_level : Opens a graphical interface to adjust node log levels
  • rviz : Opens RViz, the 3D visualization tool for ROS

USUAL / DEV

  • catkin_make : Compiles a Catkin workspace
  • source devel/setup.bash : Loads the environment of the Catkin workspace
  • catkin_init_workspace : Initializes a new Catkin workspace
  • catkin_create_pkg [package_name] [dependencies] : Creates a new Catkin package
  • roscd [package] : Changes the current working directory to a specific ROS package’s directory
  • rosed [package] [file] : Opens a file from a specific package in a text editor
  • roscp [package] [file] [destination] : Copies a file from a specific package to a destination

ROS Commands specific to AD-EYE project :

To launch a ROSBAG simulation

/////////// REQUIRED ///////////

Be sure to have in your launch file:

<rosparam>
    use_sim_time: true
</rosparam>
  • This parameter tells all ROS nodes in your launch file to use the simulation time (published on the /clock topic) instead of the system's wall-clock time.

/////////// Launch the simulation ///////////

  • roslaunch adeye my_rviz.launch (Launching a preconfigured RViz for our project)
  • roslaunch adeye manager_simulation.launch (Launch the AD-EYE software)

/////////// Playing back recorded data ///////////

  • rosbag info Name_of_the_ROSBAG.bag (To get infos on the ROSBAG)
  • rosbag play Name_of_the_ROSBAG.bag --clock --topics /fix /os_cloud_node/imu /os_cloud_node/points (Playing ROSBAG with options)

Opions :

  • --clock , Publishes the clock time from the bag file
  • --topics /fix /os_cloud_node/imu /os_cloud_node/points , Specifies which topics from the bag file should be published during playback. In this example:
    • /fix: GPS position topic
    • /os_cloud_node/imu: IMU (Inertial Measurement Unit) from the LiDAR sensor
    • /os_cloud_node/points: point cloud data from the LiDAR sensor

Press space in the ROSBAG terminal to pause it

/////////// Visualize it ///////////

  • Wait a minute for everithing to be initialized

  • Press space in the ROSBAG terminal to unpause it

  • use the 2D pose estimate tool in RViz to set the starting point of the car

  • If done right you should see the car start moving, look if the car is moving


VIM Basic Commands

Entering Insert Mode :

  • Press i to enter Insert Mode before the cursor
  • Press a to enter Insert Mode after the cursor
  • Press I to enter Insert Mode at the beginning of the line
  • Press A to enter Insert Mode at the end of the line

Exiting Insert Mode :

  • Press Esc to return to Normal Mode.

Saving and Exiting :

  • To save changes and exit, type : wq and press Enter.
  • To exit without saving changes, type : q! and press Enter.
  • To save changes without exiting, type : w and press Enter.

Navigation in Normal Mode :

  • h : Move left
  • j : Move down
  • k : Move up
  • l : Move right
  • 0 : Move to the beginning of the line
  • $ : Move to the end of the line
  • gg : Move to the beginning of the file
  • G : Move to the end of the file

Editing in Normal Mode :

  • dd : Delete the current line
  • yy : Copy (yank) the current line
  • p : Paste after the cursor
  • P : Paste before the cursor
  • u : Undo the last action
  • x : Delete the character under the cursor
  • r : Replace the character under the cursor (followed by the new character)

Ctrl + r: Redo the last undone action

⚠️ **GitHub.com Fallback** ⚠️