1. 环境
操作系统版本:openEuler 20.03 LTS
内核版本:4.19.90-2003.4.0.0036
硬件:raspberrypi4+16G SSD
最新镜像
openEuler 20.03 LTS 的内测版本镜像,下载。
openEuler 20.03 + ROS Melodic Desktopfull + SLAM + Navigation raspberrypi4镜像,下载。提取码781g
刷镜像(第2条命令可能不自动跳出终止,不影响使用。拷贝完成的标志是15G的分区能访问,且已有文件。已验证)
$ sudo umount /dev/sdb1 /dev/sdb2 /dev/sdb3 $ gzip -dc openeuler.gz | sudo dd of=/dev/sdb
$ cat ~/.bashrc
source /root/devel_isolated/setup.bash source /root/ws/devel/setup.bash #gmapping source /root/ws1/devel/setup.bash #navigation LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64 export ROS_MASTER_URI=http://127.0.0.1:11311 export ROS_HOSTNAME=127.0.0.1
该镜像的基本信息:
- 更新日志
- 发布时间:2020-05-11
- 大小:245 MiB
- 操作系统版本:openEuler 20.03 LTS
- 内核版本:4.19.90-2003.4.0.0036
- 固件来源:firmware、bluez-firmware、firmware-nonfree
- 构建文件系统的源仓库:openEuler-20.03-LTS
- 镜像内置源仓库:openEuler 20.03 LTS 源仓库
2. openEuler安装和配置
2.1 实验环境
- Windows10/Linux/Mac
- 树莓派 3B/3B+/4B
- 16G 以上的 Micro SD 卡
2.2获取树莓派 img 镜像
下载适配树莓派的最新 openEuler 镜像,下面以 XXX.img
表示该镜像。
2.3 刷机操作
Windows 环境
2.3.1 格式化 SD 卡
下载应用:SDFormater,用于格式化 SD 卡。
若 SD 卡之前未安装过镜像,盘符正常只有一个,选择 SD 卡对应盘符,直接格式化即可;
若 SD 卡之前安装过镜像,盘符会有三个,选择 SD 卡对应盘符(图例中为 E: 盘),格式化即可:
2.3.2 写入 SD 卡
- 下载应用:Win32 Disk Imager。
- 右键选择“以管理员身份运行”,打开 Win32 Disk Imager,选择镜像 img 文件和待写入的 SD 卡,点击【写入/Write】。
写入完成即可。
写入成功后,SD 卡自动分区后的盘符为:
2.4 树莓派配置
版本要求:树莓派 3B/3B+/4B。
默认用户名:root,密码:openeuler。
将刷好的 SD 卡插入树莓派,通电启用。树莓派正常启动,还需连接网线至局域网。
由于使用树莓派时,大多都使用 ssh 远程连接;在树莓派启动联网时,无法得知其 IP 地址。
有以下两种方式:
- 如果树莓派连接已知路由器,可登录路由器管理,新增的 IP 即为树莓派 IP:
- 将树莓派连接显示器,需注意,树莓派视频输出接口为 Micro HDMI
连接显示器后,直接用户名/密码登录,登录成功后,树莓派即显示本机相关信息,包括本机 IP。如下图(ssh 登录也显示这些信息):
配置无线网络
$ nmtui
添加用户
$ useradd -d /home/xbot -m xbot $ passwd xbot
2.4.1 根目录分区扩展
默认根目录分区空间比较小,在使用之前,需要对分区进行扩容。
2.4.1.1 查看磁盘分区信息
fdisk -l
获取 SD 卡磁盘信息,例如 SD 卡对应磁盘为 /dev/mmcblk0。openEuler 镜像包括 3 个分区,分别为
- 引导分区 /dev/mmcblk0p1
- 交换分区 /dev/mmcblk0p2
- 根目录分区 /dev/mmcblk0p3
这里我们需要将根目录分区进行扩容。
2.4.1.2 分区扩容
2.4.1.2.1 操作磁盘 /dev/mmcblk0
fdisk /dev/mmcblk0
2.4.1.2.2 查看当前分区情况
p
记录下分区 /dev/mmcblk0p3 的起始扇区号,这里记为 xxx
。
2.4.1.2.3 删除分区 /dev/mmcblk0p3
d
2.4.1.2.4 选择要删除的分区序号
回车(默认为 3)或 输入 3
2.4.1.2.5 创建新的分区
n
2.4.1.2.6 选择创建分区类型
回车(默认为 p)或 输入 p
2.4.1.2.7 选择要创建的分区序号
回车(默认为 3)或 输入 3
2.4.1.2.8 输入新分区的起始扇区号(下图为1593344)
注意!!!不要直接输入回车或使用默认参数。这是需要输入删除分区 /dev/mmcblk0p3 之前查看到的的起始扇区号。
xxx,上图是16G的SSD,/dev/mmcblk0p3
的起始扇区为1593344
2.4.1.2.9 输入新分区的终止扇区号
回车
取默认的最后一个扇区号。
2.4.1.2.10 是否修改扇区标记
N
不修改。
2.4.1.2.11 保存并退出
w
该操作结束后,使用 fdisk -l
命令可以看到 /dev/mmcblk0p3 大小已经扩展。但是通过 df -lh
可以看到根目录大小没有变化。
2.4.1.2.12 增大未加载的文件系统大小
resize2fs /dev/mmcblk0p3
如果该命令失败,可通过命令 reboot
重启树莓派之后再执行 resize2fs /dev/mmcblk0p3
。
该操作结束后,通过 df -lh
可以看到根目录大小已经扩展。
至此,根目录分区扩容结束。扩容过程见下图:
3. ROS安装准备
3.1 设置repo
后续安装需要两个repo来回切换,需要编辑如下文件
$ vim /etc/yum.repos.d/openEuler-20.03-LTS.repo
- 设置成 oe-repo的内容
[eveything] name=everything baseurl=https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/everything/$basearch enabled=1 gpgcheck=0 [epol] name=epol baseurl=https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/EPOL/$basearch enabled=1 gpgcheck=0 [fedora29] name=fed baseurl=http://mirrors.aliyun.com/fedora/releases/29/Everything/aarch64/os/ enabled=0 gpgcheck=0
- 设置成 fed-repo的内容
[eveything] name=everything baseurl=https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/everything/$basearch enabled=0 gpgcheck=0 [epol] name=epol baseurl=https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/EPOL/$basearch enabled=0 gpgcheck=0 [fedora29] name=fed baseurl=http://mirrors.aliyun.com/fedora/releases/29/Everything/aarch64/os/ enabled=1 gpgcheck=0
3.2 设置/etc/hosts
添加raw.githubusercontent.com中国镜像站点
$ vim /etc/hosts
151.101.76.133 raw.githubusercontent.com
3.3 添加pip镜像站点
$ mkdir ~/.pip $ vim ~/.pip/pip.conf
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
3.4 OVERRIDE操作系统信息
$ export ROS_OS_OVERRIDE=centos:7.6
4. 安装ROS
4.1 安装依赖
- 设置成 oe-repo,安装如下包
$ dnf install python2-sip-devel llvm
- 设置成 fed-repo,安装如下包
$ dnf install pcl-devel
- 设置成 oe-repo,安装如下包
$ dnf install yum $ pip install rosdep wstool rosinstall_generator
4.2 rosdep准备
- 初始化
$ rosdep init
- 使ros识别不同发行版依赖的真实包名
- 编辑base-openeuler.yaml
$ vim /etc/ros/rosdep/base-openeuler.yaml
设置内容
libboost-filesystem-dev: rhel: [boost-devel] libboost-thread-dev: rhel: [boost-devel] libjpeg: rhel: [libjpeg-turbo] python-rospkg: rhel: pip: packages: [rospkg] python-setuptools: rhel: pip: packages: [setuptools] python-gnupg: rhel: pip: packages: [gnupg] python-catkin-pkg-modules: rhel: pip: packages: [catkin-pkg] python-catkin-pkg: rhel: pip: packages: [catkin-pkg] python-rosdep: rhel: pip: packages: [rosdep]
- 编辑10-openeuler.list
$ vim /etc/ros/rosdep/sources.list.d/10-openeuler.list
设置内容
yaml file:///etc/ros/rosdep/base-openeuler.yaml
- 更新
$ rosdep update
4.3 安装Desktop-Full:源码准备
$ rosinstall_generator desktop_full --rosdistro melodic --deps --tar > melodic-desktop-full.rosinstall $ wstool init -j8 src melodic-desktop-full.rosinstall
4.4 安装Desktop-Full:rosdep自动安装依赖包
$ rosdep install --from-paths src --ignore-src --rosdistro melodic -y -r
这里,用 -r 强制让rosdep忽略错误信息继续安装找到的包。不过折腾完pcl包后,rosdep好像没有能安装的了。
- 可以忽略如下的找不到部分包等信息
ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: python_qt_binding: No definition of [python-qt5-bindings] for OS [rhel] rviz: No definition of [libogre-dev] for OS [rhel] gl_dependency: No definition of [python-qt5-bindings-gl] for OS [rhel] webkit_dependency: No definition of [python-qt5-bindings-webkit] for OS [rhel] qt_gui: No definition of [tango-icon-theme] for OS [rhel] gazebo_dev: No definition of [libgazebo9-dev] for OS [rhel]
- 最后提示有未能安装的包
- 用pip安装一下如下包 (pygraphviz 安装不了,忽略了)
$ pip install numpy $ pip install matplotlib empy netifaces pycryptodomex defusedxml pydot PyOpenGL
- 设置成fed-repo,安装如下包
$ dnf remove tinyxml $ dnf install tinyxml-devel poco-devel opencv-devel opencv-python eigen3-devel sbcl urdfdom-devel hddtemp log4cxx-devel
fedora29的tinyxml可以用,oe的tinyxml不能用
- 设置成oe-repo,补充其他包
$ dnf install boost-python2-devel $ dnf groupinstall "Development Tools"
- 其他
$ ln -s /usr/include/eigen3/Eigen /usr/include/Eigen $ cp /usr/lib64/pkgconfig/yaml-cpp-dynamic.pc /usr/lib64/pkgconfig/yaml-cpp.pc
$ vim /usr/include/tinystr.h
设置如下内容
/* www.sourceforge.net/projects/tinyxml This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #ifndef TIXML_USE_STL #ifndef TIXML_STRING_INCLUDED #define TIXML_STRING_INCLUDED #include <assert.h> #include <string.h> /* The support for explicit isn't that universal, and it isn't really required - it is used to check that the TiXmlString class isn't incorrectly used. Be nice to old compilers and macro it here: */ #if defined(_MSC_VER) && (_MSC_VER >= 1200 ) // Microsoft visual studio, version 6 and higher. #define TIXML_EXPLICIT explicit #elif defined(__GNUC__) && (__GNUC__ >= 3 ) // GCC version 3 and higher.s #define TIXML_EXPLICIT explicit #else #define TIXML_EXPLICIT #endif /* TiXmlString is an emulation of a subset of the std::string template. Its purpose is to allow compiling TinyXML on compilers with no or poor STL support. Only the member functions relevant to the TinyXML project have been implemented. The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase a string and there's no more room, we allocate a buffer twice as big as we need. */ class TiXmlString { public : // The size type used typedef size_t size_type; // Error value for find primitive static const size_type npos; // = -1; // TiXmlString empty constructor TiXmlString () : rep_(&nullrep_) { } // TiXmlString copy constructor TiXmlString ( const TiXmlString & copy) : rep_(0) { init(copy.length()); memcpy(start(), copy.data(), length()); } // TiXmlString constructor, based on a string TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0) { init( static_cast<size_type>( strlen(copy) )); memcpy(start(), copy, length()); } // TiXmlString constructor, based on a string TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0) { init(len); memcpy(start(), str, len); } // TiXmlString destructor ~TiXmlString () { quit(); } TiXmlString& operator = (const char * copy) { return assign( copy, (size_type)strlen(copy)); } TiXmlString& operator = (const TiXmlString & copy) { return assign(copy.start(), copy.length()); } // += operator. Maps to append TiXmlString& operator += (const char * suffix) { return append(suffix, static_cast<size_type>( strlen(suffix) )); } // += operator. Maps to append TiXmlString& operator += (char single) { return append(&single, 1); } // += operator. Maps to append TiXmlString& operator += (const TiXmlString & suffix) { return append(suffix.data(), suffix.length()); } // Convert a TiXmlString into a null-terminated char * const char * c_str () const { return rep_->str; } // Convert a TiXmlString into a char * (need not be null terminated). const char * data () const { return rep_->str; } // Return the length of a TiXmlString size_type length () const { return rep_->size; } // Alias for length() size_type size () const { return rep_->size; } // Checks if a TiXmlString is empty bool empty () const { return rep_->size == 0; } // Return capacity of string size_type capacity () const { return rep_->capacity; } // single char extraction const char& at (size_type index) const { assert( index < length() ); return rep_->str[ index ]; } // [] operator char& operator [] (size_type index) const { assert( index < length() ); return rep_->str[ index ]; } // find a char in a string. Return TiXmlString::npos if not found size_type find (char lookup) const { return find(lookup, 0); } // find a char in a string from an offset. Return TiXmlString::npos if not found size_type find (char tofind, size_type offset) const { if (offset >= length()) return npos; for (const char* p = c_str() + offset; *p != '\0'; ++p) { if (*p == tofind) return static_cast< size_type >( p - c_str() ); } return npos; } void clear () { //Lee: //The original was just too strange, though correct: // TiXmlString().swap(*this); //Instead use the quit & re-init: quit(); init(0,0); } /* Function to reserve a big amount of data when we know we'll need it. Be aware that this function DOES NOT clear the content of the TiXmlString if any exists. */ void reserve (size_type cap); TiXmlString& assign (const char* str, size_type len); TiXmlString& append (const char* str, size_type len); void swap (TiXmlString& other) { Rep* r = rep_; rep_ = other.rep_; other.rep_ = r; } private: void init(size_type sz) { init(sz, sz); } void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; } char* start() const { return rep_->str; } char* finish() const { return rep_->str + rep_->size; } struct Rep { size_type size, capacity; char str[1]; }; void init(size_type sz, size_type cap) { if (cap) { // Lee: the original form: // rep_ = static_cast<Rep*>(operator new(sizeof(Rep) + cap)); // doesn't work in some cases of new being overloaded. Switching // to the normal allocation, although use an 'int' for systems // that are overly picky about structure alignment. const size_type bytesNeeded = sizeof(Rep) + cap; const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); rep_ = reinterpret_cast<Rep*>( new int[ intsNeeded ] ); rep_->str[ rep_->size = sz ] = '\0'; rep_->capacity = cap; } else { rep_ = &nullrep_; } } void quit() { if (rep_ != &nullrep_) { // The rep_ is really an array of ints. (see the allocator, above). // Cast it back before delete, so the compiler won't incorrectly call destructors. delete [] ( reinterpret_cast<int*>( rep_ ) ); } } Rep * rep_; static Rep nullrep_; } ; inline bool operator == (const TiXmlString & a, const TiXmlString & b) { return ( a.length() == b.length() ) // optimization on some platforms && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare } inline bool operator < (const TiXmlString & a, const TiXmlString & b) { return strcmp(a.c_str(), b.c_str()) < 0; } inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; } inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } inline bool operator == (const char* a, const TiXmlString & b) { return b == a; } inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } TiXmlString operator + (const TiXmlString & a, const TiXmlString & b); TiXmlString operator + (const TiXmlString & a, const char* b); TiXmlString operator + (const char* a, const TiXmlString & b); /* TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString. Only the operators that we need for TinyXML have been developped. */ class TiXmlOutStream : public TiXmlString { public : // TiXmlOutStream << operator. TiXmlOutStream & operator << (const TiXmlString & in) { *this += in; return *this; } // TiXmlOutStream << operator. TiXmlOutStream & operator << (const char * in) { *this += in; return *this; } } ; #endif // TIXML_STRING_INCLUDED #endif // TIXML_USE_STL
4.5 安装Desktop-Full:编译
$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=0 --ignore-pkg rviz librviz_tutorial rqt_rviz rviz_plugin_tutorials rviz_python_tutorial gazebo_ros gazebo_plugins gazebo_ros_control qt_gui_cpp rqt_gui_cpp rqt_image_view pcl_ros
--ignore-pkg 后面的是编译不过的,目前都没有用,可以不用编译。
pcl-ros应该是可以编译的,但是会编译到一半卡住,估计资源不够了。。。
5. ROS测试
5.1 环境变量设置
$ vim ~/.bashrc
添加
source /root/devel_isolated/setup.bash LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64 export ROS_MASTER_URI=http://127.0.0.1:11311 #主机IP和端口,默认为11311端口 export ROS_HOSTNAME=127.0.0.1
$ source ~/.bashrc
5.2 简单测试
- ros安装内容测试
- rospack
$ rospack list
actionlib /root/install_isolated/share/actionlib actionlib_msgs /root/install_isolated/share/actionlib_msgs actionlib_tutorials /root/install_isolated/share/actionlib_tutorials angles /root/install_isolated/share/angles bond /root/install_isolated/share/bond bondcpp /root/install_isolated/share/bondcpp bondpy /root/install_isolated/share/bondpy camera_calibration /root/install_isolated/share/camera_calibration camera_calibration_parsers /root/install_isolated/share/camera_calibration_parsers camera_info_manager /root/install_isolated/share/camera_info_manager catkin /root/install_isolated/share/catkin class_loader /root/install_isolated/share/class_loader cmake_modules /root/install_isolated/share/cmake_modules compressed_depth_image_transport /root/install_isolated/share/compressed_depth_image_transport compressed_image_transport /root/install_isolated/share/compressed_image_transport control_msgs /root/install_isolated/share/control_msgs control_toolbox /root/install_isolated/share/control_toolbox controller_interface /root/install_isolated/share/controller_interface controller_manager /root/install_isolated/share/controller_manager controller_manager_msgs /root/install_isolated/share/controller_manager_msgs cpp_common /root/install_isolated/share/cpp_common cv_bridge /root/install_isolated/share/cv_bridge depth_image_proc /root/install_isolated/share/depth_image_proc diagnostic_aggregator /root/install_isolated/share/diagnostic_aggregator diagnostic_analysis /root/install_isolated/share/diagnostic_analysis diagnostic_common_diagnostics /root/install_isolated/share/diagnostic_common_diagnostics diagnostic_msgs /root/install_isolated/share/diagnostic_msgs diagnostic_updater /root/install_isolated/share/diagnostic_updater diff_drive_controller /root/src/ros_controllers/diff_drive_controller dynamic_reconfigure /root/install_isolated/share/dynamic_reconfigure eigen_conversions /root/install_isolated/share/eigen_conversions filters /root/install_isolated/share/filters forward_command_controller /root/install_isolated/share/forward_command_controller gazebo_dev /root/install_isolated/share/gazebo_dev gazebo_msgs /root/install_isolated/share/gazebo_msgs gencpp /root/install_isolated/share/gencpp geneus /root/install_isolated/share/geneus genlisp /root/install_isolated/share/genlisp genmsg /root/install_isolated/share/genmsg gennodejs /root/install_isolated/share/gennodejs genpy /root/install_isolated/share/genpy geometry_msgs /root/install_isolated/share/geometry_msgs gl_dependency /root/install_isolated/share/gl_dependency hardware_interface /root/install_isolated/share/hardware_interface image_geometry /root/install_isolated/share/image_geometry image_proc /root/install_isolated/share/image_proc image_publisher /root/install_isolated/share/image_publisher image_rotate /root/install_isolated/share/image_rotate image_transport /root/install_isolated/share/image_transport image_view /root/install_isolated/share/image_view interactive_marker_tutorials /root/install_isolated/share/interactive_marker_tutorials interactive_markers /root/install_isolated/share/interactive_markers joint_limits_interface /root/install_isolated/share/joint_limits_interface joint_state_controller /root/install_isolated/share/joint_state_controller joint_state_publisher /root/install_isolated/share/joint_state_publisher kdl_conversions /root/install_isolated/share/kdl_conversions kdl_parser /root/install_isolated/share/kdl_parser kdl_parser_py /root/install_isolated/share/kdl_parser_py laser_assembler /root/install_isolated/share/laser_assembler laser_filters /root/install_isolated/share/laser_filters laser_geometry /root/install_isolated/share/laser_geometry map_msgs /root/install_isolated/share/map_msgs media_export /root/install_isolated/share/media_export message_filters /root/install_isolated/share/message_filters message_generation /root/install_isolated/share/message_generation message_runtime /root/install_isolated/share/message_runtime mk /root/install_isolated/share/mk nav_msgs /root/install_isolated/share/nav_msgs nodelet /root/install_isolated/share/nodelet nodelet_topic_tools /root/install_isolated/share/nodelet_topic_tools nodelet_tutorial_math /root/install_isolated/share/nodelet_tutorial_math orocos_kdl /root/install_isolated/share/orocos_kdl pcl_conversions /root/install_isolated/share/pcl_conversions pcl_msgs /root/install_isolated/share/pcl_msgs pluginlib /root/install_isolated/share/pluginlib pluginlib_tutorials /root/install_isolated/share/pluginlib_tutorials polled_camera /root/install_isolated/share/polled_camera position_controllers /root/install_isolated/share/position_controllers python_orocos_kdl /root/install_isolated/share/python_orocos_kdl python_qt_binding /root/install_isolated/share/python_qt_binding qt_dotgraph /root/install_isolated/share/qt_dotgraph qt_gui /root/install_isolated/share/qt_gui qt_gui_py_common /root/install_isolated/share/qt_gui_py_common qwt_dependency /root/install_isolated/share/qwt_dependency realtime_tools /root/install_isolated/share/realtime_tools resource_retriever /root/install_isolated/share/resource_retriever robot_state_publisher /root/install_isolated/share/robot_state_publisher ros_environment /root/install_isolated/share/ros_environment rosbag /root/install_isolated/share/rosbag rosbag_migration_rule /root/install_isolated/share/rosbag_migration_rule rosbag_storage /root/install_isolated/share/rosbag_storage rosbash /root/install_isolated/share/rosbash rosboost_cfg /root/install_isolated/share/rosboost_cfg rosbuild /root/install_isolated/share/rosbuild rosclean /root/install_isolated/share/rosclean rosconsole /root/install_isolated/share/rosconsole rosconsole_bridge /root/install_isolated/share/rosconsole_bridge roscpp /root/install_isolated/share/roscpp roscpp_serialization /root/install_isolated/share/roscpp_serialization roscpp_traits /root/install_isolated/share/roscpp_traits roscpp_tutorials /root/install_isolated/share/roscpp_tutorials roscreate /root/install_isolated/share/roscreate rosgraph /root/install_isolated/share/rosgraph rosgraph_msgs /root/install_isolated/share/rosgraph_msgs roslang /root/install_isolated/share/roslang roslaunch /root/install_isolated/share/roslaunch roslib /root/install_isolated/share/roslib roslint /root/install_isolated/share/roslint roslisp /root/install_isolated/share/roslisp roslz4 /root/install_isolated/share/roslz4 rosmake /root/install_isolated/share/rosmake rosmaster /root/install_isolated/share/rosmaster rosmsg /root/install_isolated/share/rosmsg rosnode /root/install_isolated/share/rosnode rosout /root/install_isolated/share/rosout rospack /root/install_isolated/share/rospack rosparam /root/install_isolated/share/rosparam rospy /root/install_isolated/share/rospy rospy_tutorials /root/install_isolated/share/rospy_tutorials rosservice /root/install_isolated/share/rosservice rostest /root/install_isolated/share/rostest rostime /root/install_isolated/share/rostime rostopic /root/install_isolated/share/rostopic rosunit /root/install_isolated/share/rosunit roswtf /root/install_isolated/share/roswtf rqt_action /root/install_isolated/share/rqt_action rqt_bag /root/install_isolated/share/rqt_bag rqt_bag_plugins /root/install_isolated/share/rqt_bag_plugins rqt_console /root/install_isolated/share/rqt_console rqt_dep /root/install_isolated/share/rqt_dep rqt_graph /root/install_isolated/share/rqt_graph rqt_gui /root/install_isolated/share/rqt_gui rqt_gui_py /root/install_isolated/share/rqt_gui_py rqt_launch /root/install_isolated/share/rqt_launch rqt_logger_level /root/install_isolated/share/rqt_logger_level rqt_moveit /root/install_isolated/share/rqt_moveit rqt_msg /root/install_isolated/share/rqt_msg rqt_nav_view /root/install_isolated/share/rqt_nav_view rqt_plot /root/install_isolated/share/rqt_plot rqt_pose_view /root/install_isolated/share/rqt_pose_view rqt_publisher /root/install_isolated/share/rqt_publisher rqt_py_common /root/install_isolated/share/rqt_py_common rqt_py_console /root/install_isolated/share/rqt_py_console rqt_reconfigure /root/install_isolated/share/rqt_reconfigure rqt_robot_dashboard /root/install_isolated/share/rqt_robot_dashboard rqt_robot_monitor /root/install_isolated/share/rqt_robot_monitor rqt_robot_steering /root/install_isolated/share/rqt_robot_steering rqt_runtime_monitor /root/install_isolated/share/rqt_runtime_monitor rqt_service_caller /root/install_isolated/share/rqt_service_caller rqt_shell /root/install_isolated/share/rqt_shell rqt_srv /root/install_isolated/share/rqt_srv rqt_tf_tree /root/install_isolated/share/rqt_tf_tree rqt_top /root/install_isolated/share/rqt_top rqt_topic /root/install_isolated/share/rqt_topic rqt_web /root/install_isolated/share/rqt_web self_test /root/install_isolated/share/self_test sensor_msgs /root/install_isolated/share/sensor_msgs shape_msgs /root/install_isolated/share/shape_msgs smach /root/install_isolated/share/smach smach_msgs /root/install_isolated/share/smach_msgs smach_ros /root/install_isolated/share/smach_ros smclib /root/install_isolated/share/smclib stage /root/install_isolated/share/stage stage_ros /root/install_isolated/share/stage_ros std_msgs /root/install_isolated/share/std_msgs std_srvs /root/install_isolated/share/std_srvs stereo_image_proc /root/install_isolated/share/stereo_image_proc stereo_msgs /root/install_isolated/share/stereo_msgs tf /root/install_isolated/share/tf tf2 /root/install_isolated/share/tf2 tf2_eigen /root/install_isolated/share/tf2_eigen tf2_geometry_msgs /root/install_isolated/share/tf2_geometry_msgs tf2_kdl /root/install_isolated/share/tf2_kdl tf2_msgs /root/install_isolated/share/tf2_msgs tf2_py /root/install_isolated/share/tf2_py tf2_ros /root/install_isolated/share/tf2_ros tf_conversions /root/install_isolated/share/tf_conversions theora_image_transport /root/install_isolated/share/theora_image_transport topic_tools /root/install_isolated/share/topic_tools trajectory_msgs /root/install_isolated/share/trajectory_msgs transmission_interface /root/install_isolated/share/transmission_interface turtle_actionlib /root/install_isolated/share/turtle_actionlib turtle_tf /root/install_isolated/share/turtle_tf turtle_tf2 /root/install_isolated/share/turtle_tf2 turtlesim /root/install_isolated/share/turtlesim urdf /root/install_isolated/share/urdf urdf_parser_plugin /root/install_isolated/share/urdf_parser_plugin urdf_sim_tutorial /root/install_isolated/share/urdf_sim_tutorial urdf_tutorial /root/install_isolated/share/urdf_tutorial urdfdom_py /root/install_isolated/share/urdfdom_py visualization_marker_tutorials /root/install_isolated/share/visualization_marker_tutorials visualization_msgs /root/install_isolated/share/visualization_msgs webkit_dependency /root/install_isolated/share/webkit_dependency xacro /root/install_isolated/share/xacro xmlrpcpp /root/install_isolated/share/xmlrpcpp
- roscd
$ roscd urdf $ pwd
/root/install_isolated/share/urdf
- rosmsg
$ rosmsg list
actionlib/TestAction actionlib/TestActionFeedback actionlib/TestActionGoal actionlib/TestActionResult actionlib/TestFeedback actionlib/TestGoal actionlib/TestRequestAction actionlib/TestRequestActionFeedback actionlib/TestRequestActionGoal actionlib/TestRequestActionResult actionlib/TestRequestFeedback actionlib/TestRequestGoal actionlib/TestRequestResult actionlib/TestResult actionlib/TwoIntsAction actionlib/TwoIntsActionFeedback actionlib/TwoIntsActionGoal actionlib/TwoIntsActionResult actionlib/TwoIntsFeedback actionlib/TwoIntsGoal actionlib/TwoIntsResult actionlib_msgs/GoalID actionlib_msgs/GoalStatus actionlib_msgs/GoalStatusArray actionlib_tutorials/AveragingAction actionlib_tutorials/AveragingActionFeedback actionlib_tutorials/AveragingActionGoal actionlib_tutorials/AveragingActionResult actionlib_tutorials/AveragingFeedback actionlib_tutorials/AveragingGoal actionlib_tutorials/AveragingResult actionlib_tutorials/FibonacciAction actionlib_tutorials/FibonacciActionFeedback actionlib_tutorials/FibonacciActionGoal actionlib_tutorials/FibonacciActionResult actionlib_tutorials/FibonacciFeedback actionlib_tutorials/FibonacciGoal actionlib_tutorials/FibonacciResult bond/Constants bond/Status control_msgs/FollowJointTrajectoryAction control_msgs/FollowJointTrajectoryActionFeedback control_msgs/FollowJointTrajectoryActionGoal control_msgs/FollowJointTrajectoryActionResult control_msgs/FollowJointTrajectoryFeedback control_msgs/FollowJointTrajectoryGoal control_msgs/FollowJointTrajectoryResult control_msgs/GripperCommand control_msgs/GripperCommandAction control_msgs/GripperCommandActionFeedback control_msgs/GripperCommandActionGoal control_msgs/GripperCommandActionResult control_msgs/GripperCommandFeedback control_msgs/GripperCommandGoal control_msgs/GripperCommandResult control_msgs/JointControllerState control_msgs/JointJog control_msgs/JointTolerance control_msgs/JointTrajectoryAction control_msgs/JointTrajectoryActionFeedback control_msgs/JointTrajectoryActionGoal control_msgs/JointTrajectoryActionResult control_msgs/JointTrajectoryControllerState control_msgs/JointTrajectoryFeedback control_msgs/JointTrajectoryGoal control_msgs/JointTrajectoryResult control_msgs/PidState control_msgs/PointHeadAction control_msgs/PointHeadActionFeedback control_msgs/PointHeadActionGoal control_msgs/PointHeadActionResult control_msgs/PointHeadFeedback control_msgs/PointHeadGoal control_msgs/PointHeadResult control_msgs/SingleJointPositionAction control_msgs/SingleJointPositionActionFeedback control_msgs/SingleJointPositionActionGoal control_msgs/SingleJointPositionActionResult control_msgs/SingleJointPositionFeedback control_msgs/SingleJointPositionGoal control_msgs/SingleJointPositionResult controller_manager_msgs/ControllerState controller_manager_msgs/ControllerStatistics controller_manager_msgs/ControllersStatistics controller_manager_msgs/HardwareInterfaceResources diagnostic_msgs/DiagnosticArray diagnostic_msgs/DiagnosticStatus diagnostic_msgs/KeyValue dynamic_reconfigure/BoolParameter dynamic_reconfigure/Config dynamic_reconfigure/ConfigDescription dynamic_reconfigure/DoubleParameter dynamic_reconfigure/Group dynamic_reconfigure/GroupState dynamic_reconfigure/IntParameter dynamic_reconfigure/ParamDescription dynamic_reconfigure/SensorLevels dynamic_reconfigure/StrParameter gazebo_msgs/ContactState gazebo_msgs/ContactsState gazebo_msgs/LinkState gazebo_msgs/LinkStates gazebo_msgs/ModelState gazebo_msgs/ModelStates gazebo_msgs/ODEJointProperties gazebo_msgs/ODEPhysics gazebo_msgs/WorldState geometry_msgs/Accel geometry_msgs/AccelStamped geometry_msgs/AccelWithCovariance geometry_msgs/AccelWithCovarianceStamped geometry_msgs/Inertia geometry_msgs/InertiaStamped geometry_msgs/Point geometry_msgs/Point32 geometry_msgs/PointStamped geometry_msgs/Polygon geometry_msgs/PolygonStamped geometry_msgs/Pose geometry_msgs/Pose2D geometry_msgs/PoseArray geometry_msgs/PoseStamped geometry_msgs/PoseWithCovariance geometry_msgs/PoseWithCovarianceStamped geometry_msgs/Quaternion geometry_msgs/QuaternionStamped geometry_msgs/Transform geometry_msgs/TransformStamped geometry_msgs/Twist geometry_msgs/TwistStamped geometry_msgs/TwistWithCovariance geometry_msgs/TwistWithCovarianceStamped geometry_msgs/Vector3 geometry_msgs/Vector3Stamped geometry_msgs/Wrench geometry_msgs/WrenchStamped map_msgs/OccupancyGridUpdate map_msgs/PointCloud2Update map_msgs/ProjectedMap map_msgs/ProjectedMapInfo nav_msgs/GetMapAction nav_msgs/GetMapActionFeedback nav_msgs/GetMapActionGoal nav_msgs/GetMapActionResult nav_msgs/GetMapFeedback nav_msgs/GetMapGoal nav_msgs/GetMapResult nav_msgs/GridCells nav_msgs/MapMetaData nav_msgs/OccupancyGrid nav_msgs/Odometry nav_msgs/Path pcl_msgs/ModelCoefficients pcl_msgs/PointIndices pcl_msgs/PolygonMesh pcl_msgs/Vertices roscpp/Logger rosgraph_msgs/Clock rosgraph_msgs/Log rosgraph_msgs/TopicStatistics rospy_tutorials/Floats rospy_tutorials/HeaderString sensor_msgs/BatteryState sensor_msgs/CameraInfo sensor_msgs/ChannelFloat32 sensor_msgs/CompressedImage sensor_msgs/FluidPressure sensor_msgs/Illuminance sensor_msgs/Image sensor_msgs/Imu sensor_msgs/JointState sensor_msgs/Joy sensor_msgs/JoyFeedback sensor_msgs/JoyFeedbackArray sensor_msgs/LaserEcho sensor_msgs/LaserScan sensor_msgs/MagneticField sensor_msgs/MultiDOFJointState sensor_msgs/MultiEchoLaserScan sensor_msgs/NavSatFix sensor_msgs/NavSatStatus sensor_msgs/PointCloud sensor_msgs/PointCloud2 sensor_msgs/PointField sensor_msgs/Range sensor_msgs/RegionOfInterest sensor_msgs/RelativeHumidity sensor_msgs/Temperature sensor_msgs/TimeReference shape_msgs/Mesh shape_msgs/MeshTriangle shape_msgs/Plane shape_msgs/SolidPrimitive smach_msgs/SmachContainerInitialStatusCmd smach_msgs/SmachContainerStatus smach_msgs/SmachContainerStructure std_msgs/Bool std_msgs/Byte std_msgs/ByteMultiArray std_msgs/Char std_msgs/ColorRGBA std_msgs/Duration std_msgs/Empty std_msgs/Float32 std_msgs/Float32MultiArray std_msgs/Float64 std_msgs/Float64MultiArray std_msgs/Header std_msgs/Int16 std_msgs/Int16MultiArray std_msgs/Int32 std_msgs/Int32MultiArray std_msgs/Int64 std_msgs/Int64MultiArray std_msgs/Int8 std_msgs/Int8MultiArray std_msgs/MultiArrayDimension std_msgs/MultiArrayLayout std_msgs/String std_msgs/Time std_msgs/UInt16 std_msgs/UInt16MultiArray std_msgs/UInt32 std_msgs/UInt32MultiArray std_msgs/UInt64 std_msgs/UInt64MultiArray std_msgs/UInt8 std_msgs/UInt8MultiArray stereo_msgs/DisparityImage tf/tfMessage tf2_msgs/LookupTransformAction tf2_msgs/LookupTransformActionFeedback tf2_msgs/LookupTransformActionGoal tf2_msgs/LookupTransformActionResult tf2_msgs/LookupTransformFeedback tf2_msgs/LookupTransformGoal tf2_msgs/LookupTransformResult tf2_msgs/TF2Error tf2_msgs/TFMessage theora_image_transport/Packet trajectory_msgs/JointTrajectory trajectory_msgs/JointTrajectoryPoint trajectory_msgs/MultiDOFJointTrajectory trajectory_msgs/MultiDOFJointTrajectoryPoint turtle_actionlib/ShapeAction turtle_actionlib/ShapeActionFeedback turtle_actionlib/ShapeActionGoal turtle_actionlib/ShapeActionResult turtle_actionlib/ShapeFeedback turtle_actionlib/ShapeGoal turtle_actionlib/ShapeResult turtle_actionlib/Velocity turtlesim/Color turtlesim/Pose visualization_msgs/ImageMarker visualization_msgs/InteractiveMarker visualization_msgs/InteractiveMarkerControl visualization_msgs/InteractiveMarkerFeedback visualization_msgs/InteractiveMarkerInit visualization_msgs/InteractiveMarkerPose visualization_msgs/InteractiveMarkerUpdate visualization_msgs/Marker visualization_msgs/MarkerArray visualization_msgs/MenuEntry
$ rosmsg info LaserScan
[sensor_msgs/LaserScan]: std_msgs/Header header uint32 seq time stamp string frame_id float32 angle_min float32 angle_max float32 angle_increment float32 time_increment float32 scan_time float32 range_min float32 range_max float32[] ranges float32[] intensities
- 运行测试
- 启动roscore
$ roscore
... logging to /root/.ros/log/a6a79a40-98d9-11ea-9ee2-dca632413d3a/roslaunch-openEuler-175630.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. roscore started roslaunch server http://127.0.0.1:43005 ros_comm version 1.14.5 SUMMARY ======== PARAMETERS * /rosdistro: melodic * /rosversion: 1.14.5 NODES auto-starting new master process[master]: started with pid [175640] ROS_MASTER_URI=http://127.0.0.1:11311 roscore http://127.0.0.1:11311/ setting /run_id to a6a79a40-98d9-11ea-9ee2-dca632413d3a process[rosout-1]: started with pid [175651] started core service [/rosout]
- 打开一个新终端,
[[email protected] ~]# rosnode list /rosout [[email protected] ~]# rostopic list /rosout /rosout_agg [[email protected] ~]# rosservice list /rosout/get_loggers /rosout/set_logger_level [[email protected] ~]# rosparam list /rosdistro /roslaunch/uris/host_127_0_0_1__45249 /rosversion /run_id