This package contains some convenient command line tool for hpp. Current tools are:
- hppcd
- hpplog
- hppmake
- change_develconfig
- recursivegit
- wgit
- gdbvim
- hppautorestart
- a gdb command to visualize configuration (See GDB Command)
For gdbvim command, you must install the vim plugin pyclewn.
First, the classic procedure:
$ mkdir build && cd build
$ cmake ..
$ make installYou need to source the file ${CMAKE_INSTALL_PREFIX}/etc/hpp-tools/bashrc. If you use the installation procedure described in HPP, you can simply add this line to ${DEVEL_HPP_DIR}/config.sh:
[ -f "${INSTALL_HPP_DIR}/etc/hpp-tools/bashrc" ] && source "${INSTALL_HPP_DIR}/etc/hpp-tools/bashrc"
# If you use ROS, you may want to add so that catkin works fine with hppcd
export ROS_LANG_DISABLE=genlisp:geneus:gennodejsOptionally, you can use make target hppcd-defaults to install some link for HPP software:
$ make hppcd-defaultsaddhppcd [<dir> [<alias>]]adds a folder tohppcdhppcd <alias>goes the folder linked to 'alias'. It is compliant withcd -.hpplog [binary-name]automatically tails the logs of the running hpp server. If no hpp server is running, it waits. The argument is the name of the binary file writting the logs. It defaults to hppcorbaserver.hppmake --make-args "-s -j4" --debug hpp-core --release hpp-corbaserverwill build, in order, hpp-core (resp. hpp-corbaserver) in debug mode (resp. in release mode).filterhppoutputcompresses hpp-util output. Use it like this:hpplog | filterhppoutput.gdbvim [file-or-command]
hppautorestart <command>This automatically restarts thecommandwhen it crashes or when you enterhpprestartin another terminal.hpprestartThis restarts all the command that have been launched usinghppautorestart.
First, here is a list of interesting git alias (Use git config --global alias.<aliasname> <alias-command>):
-
condensed pretty logs:
log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -
expanded pretty logs:
log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all -
recursivegit [git-command]applies a git command on all subdirectories that are git repositories. To know the general state of your source repository:recursivegit status --short --branch. For fetching all repository:recursivegit fetch --all... -
wgitsimply combines commandwatchandgit. Try it with one of the alias log command above !
The command forward-geometry enables you to display configuration directly in a viewer (gepetto-viewer or hpp-gui). The requirement for this command to work are the following:
- compile
gdbwith python 2.7 support (and not python 3.4). You may skip this if you already have the good support. GDB 7.7.1 is by default compile with python 3.4- download the source: run
cd /local/src && apt-get source gdbin a folder (I recommend/local/src/) - configure and install:
cd /local/src/gdb-7.7.1,./configure --prefix=/local --with-python=python2.7andsudo make install - make sure the binary is available:
which gdbshould give you the path to the installed executable
- download the source: run
- add the following lines to
~/.gdbinit:
python
import os
gdb.execute ("directory " + os.environ["DEVEL_HPP_DIR"] + "/install/etc/gdb/")
end
source gdbinit
# If you do not use the DEVEL_HPP_DIR environment variable, then use this instead.
# source ${CMAKE_INSTALL_PREFIX}/install/etc/gdb/gdbinit
- run
help forward-geometryin the gdb cli.
### Log highlighter
Copy highlight/log.lang to ~/.highlight/langDefs/log.lang