ubuntu20.04安装ros1

步骤

基本步骤

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

sudo apt update

sudo apt install ros-noetic-desktop-full

sudo apt install ros-noetic-rosbag

source /opt/ros/noetic/setup.bash

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc

source ~/.bashrc

测试

  1. 打开一个终端
roscore
  1. 打开另一个终端
rqt_bag
  1. 在打开的界面中加载bag文件。
  2. rosbag命令
rosbag play test.bag
rosbag info test.bag

rostopic list
rostopic echo /topic

安装python rosbag包

sudo apt install python3-pip
pip install roslz4 --extra-index-url https://rospypi.github.io/simple/
pip install rosbag

参考

  • Ubuntu install of ROS Noetic

你可能感兴趣的:(ROS,ros)