ROS笔记

ROS传参的几种方法

sleep

ros::Duration(0.5).sleep(); // sleep for half a second

rostopic

rostopic pub /<topic_name> geometry_msgs/PoseStamped -r 1 -- '{header: {stamp: now, frame_id: "/map"}, pose: {position: {x: 0, y: 0, z: 0}, orientation: {x: 0, y: 0, z: 0, w: 1}}}'

catkin_make

catkin_make -DCATKIN_WHITELIST_PACKAGES="包名" # 工作空间编译指定的功能包
catkin_make -DCATKIN_WHITELIST_PACKAGES="package1;package2"
catkin_make -DCATKIN_WHITELIST_PACKAGES="" # 恢复编译所有功能包

ros时间戳转换

时间戳:自UTC 时间 1970-01-01 00:00:00 以来所经过的秒数

中国标准时间(CST)比世界协调时间(UTC)早08:00小时,CST = UTC + 08:00

在线转换:https://tool.lu/timestamp/

date +%s # 输出当前时间对应的UNIX时间戳
date -d "2019-09-21 21:48:35" +%s # 输出指定时间对应的UNIX时间戳
date -d @1568110830.00 # 输出 "Tue Sep 10 18:20:30 CST 2019"

参考:http://wiki.ros.org/rosbag/Commandline

 

WARNING: disk usage in log directory [/home/alan/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.

$ rosclean check
1.1G ROS node logs

$ rosclean purge
Purging ROS node logs.
PLEASE BE CAREFUL TO VERIFY THE COMMAND BELOW!
Okay to perform:

rm -rf /home/jinshan.lan/.ros/log
(y/n)?
y
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值