ros相关笔记

catkin_make不编译某些package

https://answers.ros.org/question/54181/how-to-exclude-one-package-from-the-catkin_make-build/
catkin_make -DCATKIN_BLACKLIST_PACKAGES="foo;bar"

查看cmake相关变量

比如查看CATKIN变量
在build目录
cmake -L|grep CATKIN

CATKIN_BLACKLIST_PACKAGES:STRING=vps_detect
CATKIN_DEVEL_PREFIX:PATH=/home/nano/***/devel
CATKIN_ENABLE_TESTING:BOOL=ON
CATKIN_SKIP_TESTING:BOOL=OFF
CATKIN_SYMLINK_INSTALL:BOOL=OFF
CATKIN_WHITELIST_PACKAGES:STRING=

日志相关

rosconsole will load a config file from $ROS_ROOT/config/rosconsole.config when it initializes.
rosconsole also lets you define your own configuration file that will be used by log4cxx, defined by the ROSCONSOLE_CONFIG_FILE environment variable. Anything defined in this config file will override the default config file.

A simple example:

 # Set the default ros output to warning and higher
 log4j.logger.ros=WARN
 # Override my package to output everything
 log4j.logger.ros.my_package_name=DEBUG
cd $ROS_ROOT/config
vi rosconsole.config
#
#   rosconsole will find this file by default at $ROS_ROOT/config/rosconsole.config
#
#   You can define your own by e.g. copying this file and setting
#   ROSCONSOLE_CONFIG_FILE (in your environment) to point to the new file
#
log4j.logger.ros=INFO
log4j.logger.ros.roscpp.superdebug=WARN

拷贝文件到xx目录,配置ROSCONSOLE_CONFIG_FILE环境变量=xx/rosconsole.config
日志级别分为

  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL

launch file相关

catkin_make编译相关

要让ros将某个目录认为是一个package.则在该目录下需要有package.xml文件

rostopic

查看当前有哪些topic

查看某一topic具体内容
ros相关笔记_第1张图片

你可能感兴趣的:(ros相关笔记)