Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9152177
  • 博文数量: 1727
  • 博客积分: 12961
  • 博客等级: 上将
  • 技术积分: 19860
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 11:25
个人简介

偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.

文章分类

全部博文(1727)

文章存档

2024年(3)

2023年(26)

2022年(112)

2021年(217)

2020年(157)

2019年(192)

2018年(81)

2017年(78)

2016年(70)

2015年(52)

2014年(40)

2013年(51)

2012年(85)

2011年(45)

2010年(231)

2009年(287)

分类: 其他平台

2019-02-27 17:29:36

点击(此处)折叠或打开

  1. catkin_make 编译指定的包.
  2. $ catkin_make -DCATKIN_WHITELIST_PACKAGES="package1;package2"

  3. 恢复编译所有的包
  4. $ catkin_make -DCATKIN_WHITELIST_PACKAGES=""
执行roslaunch命令行时,会自动运行roscore命令,因此使用启动文件运行节点时不需要新开终端运行roscore。

点击(此处)折叠或打开

  1. rostopic list #列出话题
  2. rostopic echo 话题 #接收话题

编译时出现 .msg: Invalid declaration: 类型 变量. 切记 <类型 变量>之间的分割为空格 不能是tab.

Built-in types:

Primitive Type

Serialization

C++

Python2

Python3

bool (1)

unsigned 8-bit int

uint8_t (2)

bool

int8

signed 8-bit int

int8_t

int

uint8

unsigned 8-bit int

uint8_t

int (3)

int16

signed 16-bit int

int16_t

int

uint16

unsigned 16-bit int

uint16_t

int

int32

signed 32-bit int

int32_t

int

uint32

unsigned 32-bit int

uint32_t

int

int64

signed 64-bit int

int64_t

long

int

uint64

unsigned 64-bit int

uint64_t

long

int

float32

32-bit IEEE float

float

float

float64

64-bit IEEE float

double

float

string

ascii string (4)

std::string

str

bytes

time

secs/nsecs unsigned 32-bit ints

duration

secs/nsecs signed 32-bit ints


查看两个frame的坐标系转化关系
rosrun tf tf_echo base_link map
rosrun tf tf_monitor base_link map

命令行发布一个topic
rostopic pub /crash_jump_cmd std_msgs/Empty

ROS_INFO等没有输出的情况:
 

点击(此处)折叠或打开

  1. 制作文件 custom_rosconsole.conf

  2. # Set the default ros output to warning and higher
  3. log4j.logger.ros=WARN
  4. # Override my package to output everything (Change the level to fit your needs)
  5. log4j.logger.ros.你的包名=DEBUG

  6. 1. 在bash环境下
  7. export ROSCONSOLE_CONFIG_FILE=<config_file_path>/custom_rosconsole.conf

  8. 2. 或者在 launch 文件中.
  9. <launch>
  10.   <env name="ROSCONSOLE_CONFIG_FILE"
  11.        value="$(find mypackage)/custom_rosconsole.conf"/>
  12.   <node pkg="mypackage" type="mynode" name="mynode" output="screen"/>
  13. </launch>

  14. 还有一种是在代码中设置.
  15. #include <ros/console.h>
  16. if (ros::console::set_logger_level(ROSCONSOLE_DEFAULT_NAME, ros::console::levels::Debug)) { // Change the level to fit your needs
  17.    ros::console::notifyLoggerLevelsChanged();
  18. }





阅读(9440) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~