0%

ROS详解(一):安装和常见操作

Tutorial

1. BUILD

1
2
catkin_make_isolated --only-pkg-with-deps [your_packages] --use-ninja
catkin_make --only-pkg-with-deps [your_package] -DCMAKE_BUILD_TYPE=Release

Refresh WorkingSpace

1
source devel/setup.sh

rosparam

1
2
rosparam get /use_sim_time
rosparam set /use_sim_time true

rosbag play

1
2
rosbag play [your_bag] -l --clock --pause -r 0.8
rosbag info [your_bag]

Convert pcap to rosbag

1
2
rosrun ve lodyne_driver velodyne_node _model:=VLP16 [32E] _pcap:=/your/file.pcap _read_once:=true
rosrun rosbag record -O your_output.bag -a [/velodyne_packets]

Initialize Workspace

1
2
3
4
mkdir catkin_ws
cd catkin_ws
wstool init src
wstool update -t src

How to Create a package

1
2
cd catkin_ws/src
catkin_create_pkg [package-name]

Start ROS server

1
roscore

rostopic

1
2
3
4
5
rostopic echo /velodyne_points | grep frame_id
rostopic echo /tf | grep frame_id
rostopic list
rosrun rviz rviz
rosbag record [topic1] [topic2] -O bagfile.bag

rviz

1
2
rviz
rosrun rviz rviz
1
<remap from="original_defined_topic" to="acturally_used_topic" / >
1
roslaunch loam_velodyne loam_velodyne.launch
1
roslaunch velodyne_pointcloud 64e_points-2.launch
------ 本文结束 ------