ROS 进阶学习笔记(16):ROS导航1:关于Costmap_2d Package (代价地图包)

2023-05-16

 === 关于Costmap_2d Package ===

wiki page: http://wiki.ros.org/costmap_2d

=== 我遇到的问题是 obstacle layer的刷新频率太低 ===

 costmap_2d包下的所有类文档:http://docs.ros.org/hydro/api/costmap_2d/html/annotated.html
 其中,值得注意滴是 costmap_2d::ObservationBuffer 这个类,这个类会被 costmap_2d::ObstacleLayer 调用,obstacle_layer.cpp(Link of source code)
 其中,observation_keep_time和expected_update_rate应该是决定刷新频率的参数,其默认是0.0
 但实际nav_test.py运行时,这个参数是1.0, 我用rosparam set改成0.0了也没实际效果。

 I'm trying to solve this issue....


=== 我学这个包的时候,尽量总结wiki page上的内容如下:===
所属Stack: navigation
关于这个包在 ROS Navigation 框架中的位置,参见: ROS探索总结(十三)——导航与定位框架

Sammary:

   1. 实现2D cost map
   2. 输入: sensor data
   3. 生成: 占用格数据,inflates cost in a 2D costmap.
   4. 支持 基于map_server的一个costmap的初始化,
      支持 基于rolling window的costmaps,
      支持 基于参数的,对一个传感器topics的配置的订阅。

wiki web page上有图(图片地址见下),说明神马是cost map.
 
图片地址:http://wiki.ros.org/costmap_2d?action=AttachFile&do=get&target=costmap_rviz.png
   红色cell是costmap 上的障碍,蓝色是通过机器人半径膨胀出的障碍,红色多边形是机器人

footprint即垂直投影。要不碰撞,footprint不能和红色cell有交叉,并且地,机器人中心不能与蓝色

cell有交叉。

   costmap_2d这个包提供了一个可以配置的结构。这个结构处理关于机器人在一个occupancy grid(占

用网格)里,应该导航到哪里的信息。costmap 使用了传感器数据和来自固态地图的信息,通过

costmap_2d::Costmap2DROS对象(Object),来保存和更新关于障碍物的信息。

costmap_2d::Costmap2DROS对象,提供了一个purely 2D接口给它的用户,这意味着queries about

obstacles can only be made in columns(列). 例如,一张桌子和一双鞋在XY平面上的同一个地方,但

有不同的Z高度,这会让在costmap_2d::Costmap2DROS对象中对应的cell有相同的cost值(译者注:看来

,cost可翻译成“占用”)。这种设计就是为了便于planar spaces中的路径规划。(注:看来

costmap_2d::Costmap2DROS对象很重要)
 
   Hydro版本中,the underlying(已有的) methods used to write data to the costmap is fully

configurable. Each bit of functionality exists in a layer. 举个例子:静态地图在第一层,

obstacles 是另一层。默认地,the obstacle layer maintains information three dimentionally.(

这里用的是voxel_grid包,关于voxel_grid,它提供了一个关于efficient 3D voxel grid的实现。体素

或立体像素(voxel)。The occupancy grid can support 3 different representations for the state

of a cell: marked, free, or unknown.)Maintaining 3D 障碍数据使得这些层可以更智能地处理

marking and clearing.

   主要的接口就是costmap_2d::Costmap2DROS对象,它Maintain了很多有关ROS的功能。
   1. 包括,costmap_2d::LayeredCostmap类,用来keep track of each of the layers。
   2. 每个层是在Costmap2DROS中,用pluginlib来实例化,并加入到LayeredCostmap类的对象中(Each

layer is instantiated in the Costmap2DROS using pluginlib(http://wiki.ros.org/pluginlib)

and is added to the LayeredCostmap. )这些层们可能独立地被编译,允许通过C++interface来对

costmap任意的改变。
   3. 还有一个costmap_2d::Costmap2D类,implements the basic data structure for storing and

accessing the two dimensional costmap. 实现了基础的数据结构,用来存储和读取2D costmap的数据

结构。
   The main interface is costmap_2d::Costmap2DROS which maintains much of the ROS related

functionality. It contains a costmap_2d::LayeredCostmap which is used to keep track of each

of the layers. Each layer is instantiated in the Costmap2DROS using pluginlib and is added

to the LayeredCostmap. The layers themselves may be compiled individually, allowing

arbitrary changes to the costmap to be made through the C++ interface. The

costmap_2d::Costmap2D class implements the basic data structure for storing and accessing

the two dimensional costmap.
   (看到这里我有点晕,大意就是costmap实例化了就成了Layer, 通过Costmap2DROS类来实例化,放在

了以LayeredCostmap类下的对象里,由LayeredCostmap管理。)
   下面就讲how the costmap updates the occupancy grid. 带有去往不同layer工作机制介绍页面的

链接。
 

【标记和清除机制】

   The costmap automatically subscribes to sensors topics over ROS and updates itself

accordingly. Each sensor is used to either mark (insert obstacle information into the

costmap), clear (remove obstacle information from the costmap), or both. A marking

operation is just an index into an array to change the cost of a cell. 但是,清除机制就包含

通过网格的raytracing(光线追踪).这个网格源自每个由传感器报告上来的观察。如果一个3D数据结构

用来存储obstacle 信息,在put them into costmap时,我们要把它的每一列数据重新映射到2D。

【Occupied, Free, and Unkown空间】

   每个方格有255个值,8位
   每个方格在这种数据结构下,有三种状态:free, occupied, unknown
   每个状态都有其对应的cost value.
   有些列有相当数量的occupied cells,就被分配了一个 costmap_2d::LETHAL_OBSTACLE cost。
   有些列有相当数量的unknown cells,就被分配了一个 costmap_2d::NO_INFORMATION cost。
   有些列有相当数量的occupied cells,就被分配了一个 costmap_2d::FREE_SPACE cost。
   

【地图更新】

   执行更新,At the rate specified by the update_frequency 参数。costmap的占用数据结构

(occupancy structure)要执行更新。并且这个数据结构要映射到costmap,where 合适的cost value要

分配,按照occupied, free and unkown的阈值来。这个进行完了,每个障碍的膨胀就要在每个cell上进

行,在 costmap_2d::LETHAL_OBSTACLE cost 的指导下进行。按照用户指定的半径进行繁殖。具体要在

下面inflation process中介绍。

【tf坐标变换】

   假设所有的变换都是在 global_frame参数和robot_base_frame指定的 坐标系 之间变换。
   transfor_tolerance 参数设置了这些变换之间的最大延迟量(latency),没有够快就会被

navigation stack叫停机器人。

【Inflation膨胀】

  图片:http://wiki.ros.org/costmap_2d?action=AttachFile&do=get&target=costmapspec.png
 
  定义了5个象征符号for costmap values
    1. Lethal - 致命的
    2. Inscribed - 内切的
    3. Possibly circumscribed - 可能外切的
        the true value is influenced by both the inscribed_radius and inflation_radius parameters
    4. Freespace - 0=costvalue, 机器人可去的地方
    5. Unknown - No info
    6. 其他介于free 和 possibly circumscribed之间的。就看它的距离和用户定义的decay函数了。

    这些定义背后的原理就是: 我们把有些东西留给了对路径规划器的实现方式上。是不是要考虑实际的
footprint, 仍然给他们了足够的信息让他们拿来生成tracing out the footprint的cost.
    总结: 在ROS的导航中,costmap_2d这个包主要负责根据传感器的信息建立和更新二维或三维的地图。ROS的地图(costmap)采用网格(grid)的形式,每个网格的值从0~255,分为三种状态:占用(有障碍物)、无用(空闲的)、未知。
    上图共分为五个部分:(下面的红色框图是机器人的轮廓,旁边的黑框是上图的映射位置)
      (1) Lethal(致命的):机器人的中心与该网格的中心重合,此时机器人必然与障碍物冲突。
      (2) Inscribed(内切):网格的外切圆与机器人的轮廓内切,此时机器人也必然与障碍物冲突。
      (3) Possibly circumscribed(外切):网格的外切圆与机器人的轮廓外切,此时机器人相当于靠在障碍物附近,所以不一定冲突。
      (4) Freespace(自由空间):没有障碍物的空间。
      (5) Unknown(未知):未知的空间。

【地图类型】

  生成costmap_2d::Costmap2DROS有2中方式,
  • 第一种是:seed it with a user-generated static map,走到哪里蔽障就是。
  • 第二种:give it a width and height and to set the rolling_window parameter to be true。rolling_window parameter让机器人处在costmap正中间,当机器人走太远时,放下障碍物。这种一般用在计程计调整架构(odometric coordinate frame)中,这种架构里,机器人只关心在一个local area里的障碍物。这里涉及到的rolling_window参数是用来设置在机器人移动过程中是否需要滚动窗口,以保持机器人处于中心位置。

【组件及API】

   本节介绍编程时具体如何建立上述的对象,参数配置说明,层定义等.

   1. 关于 Costmap2DROS 类

      这 costmap_2d::Costmap2DROS 对象是一个对 costmap_2d::Costmap2D 对象的Wrapper封装器,把它的功能暴露成一个C++ ROS Wrapper . 它是在ROS的命名空间里(这里我们在下面就以~<name>开头)进行特殊的初始化。
      一个创建 costmap_2d::Costmap2DROS 对象的代码例子如下:
    -------------------Code:-----------------
       #include <tf/transform_listener.h>
       #include <costmap_2d/costmap_2d_ros.h>
       ...
       ...
       tf::TransformListener tf_lsnr(ros::Duration(10));
       costmap_2d::Costmap2DROS costmap_obj("my_costmap",tf);
     --------------------------------------------

     1.1 关于 ROS API

         关于老的参数的注意事项:
         很多参数都相对hydro版本以前的版本变化了,为了更大化参数配置的自由度。那些老参数的命名空间还是会work, 没有必要reconfigure你的robot. 但是,当costmap代码运行时,首先发生的是,参数们将会被从他们老的地方移除,然后放到the new locations with plugins properly added.

     1.2 Costmap2DROS 对象要收听的主题:

         ~<name>/footprint (geometry_msgs/Polygon)
         Specification for the footprint of the robot. This replaces the previous parameter specification of the footprint.

     1.3 Costmap2DROS 对象要发布的主题:

         ~<name>/grid (nav_msgs/OccupancyGrid)
                 The values in the costmap
         ~<name>/grid_updates (map_msgs/OccupancyGridUpdate)
                 The values of the updated area of the costmap
         ~<name>/voxel_grid (costmap_2d/VoxelGrid)
                 Optionally advertised when the underlying occupancy grid uses voxels and the user requests the voxel grid be published.

     1.4 **参数配置说明**

         costmap_2d::Costmap2DROS 对象是可以高度参数配置化的对象,参数涉及到的模块有:坐标系、tf, rate节拍, 机器人的解析,and, 地图管理。
         ==坐标系和tf参数==
         ~<name>/global_frame (string, default: "/map")
            The global frame for the costmap to operate in.
            定义costmap操作时,所参考的全局地图,默认是/map,String类型

         ~<name>/robot_base_frame (string, default: "base_link")
            The name of the frame for the base link of the robot.
            机器人基础坐标系

         ~<name>/transform_tolerance (double, default: 0.2)
            Specifies the delay in transform (tf) data that is tolerable in seconds.
            定义了tf数据可以容忍(tolerable)延迟到达的时间.
This parameter serves as a safeguard to losing a link in the tf tree while still allowing an amount of latency the user is comfortable with to exist in the system. For example, a transform being 0.2 seconds out-of-date may be tolerable, but a transform being 8 seconds out of date is not. If the tf transform between the coordinate frames specified by the global_frame and robot_base_frame parameters is transform_tolerance seconds older than ros::Time::now(), then the navigation stack will stop the robot.
            如果一个tf变换超过了tolerance限定的时间,机器人将被停止。

         ==rate节拍参数==
         ~<name>/update_frequency (double, default: 5.0)
            The frequency in Hz for the map to be updated.
            地图更新速度,Hz

         ~<name>/publish_frequency (double, default: 0.0)
            The frequency in Hz for the map to be publish display information.
            地图发布到显示信息的频率

         == 地图管理参数 ==
         ~<name>/rolling_window (bool, default: false)
            Whether or not to use a rolling window version of the costmap.
            是不是要用滚动窗口模式(机器人不动)来查看地图
            If the static_map parameter is set to true, this parameter must be set to false. 如果static_map参数设置为1,这个参数就要设置为0

         == 下面这些参数是可以被有些层重写的,名字上讲,就是the static map层 ==
         ~<name>/width (int, default: 10)
            The width of the map in meters.
         ~<name>/height (int, default: 10)
            The height of the map in meters.
         ~<name>/resolution (double, default: 0.05)
            The resolution of the map in meters/cell.

         ~<name>/origin_x (double, default: 0.0)
            The x origin of the map in the global frame in meters.
         ~<name>/origin_y (double, default: 0.0)
            The y origin of the map in the global frame in meters.

         "width," "height," 和"resolution" 设置设置costmap代价地图长(米)、高(米)和分辨率(米/格)。分辨率可以设置的与静态地图不同,但是一般情况下两者是相同的。

     **以上就是costmap参数配置说明**这些参数是存放在 local_costmap_params.yaml 文件中的

     1.5 tf变换要求

         (value of global_frame parameter) → (value of robot_base_frame parameter)
         Usually provided by a node responsible for odometry or localization such as amcl(link).
         通常都是由负责odometry或者定位的node,比如amcl node,来提供这个tr 变换。

     1.6 C++ API

         For C++ level API documentation on the costmap_2d::Costmap2DROS class, please see the following page:Costmap2DROS C++ API


   2. 关于层 Layer 的 Specification 指派/定义

  • Static Map Layer - The static map layer represents a largely unchanging portion of the costmap, like those generated by SLAM.
  • Obstacle Map Layer - The obstacle layer tracks the obstacles as read by the sensor data. The ObstacleCostmapPlugin marks and raytraces obstacles in two dimensions, while theVoxelCostmapPlugin does so in three dimensions.
  • Inflation Layer - The inflation layer is an optimization that adds new values around lethal obstacles (i.e. inflates the obstacles) in order to make the costmap represent the configuration space of the robot.
  • Other Layers - Other layers can be implemented and used in the costmap via pluginlib. Any additional plugins are welcomed to be listed and linked to below.
    >> SocialCostmapPlugin
    >>
    >>



以上就是对wiki/costmap_2D官方页面的不准确翻译,纯当学习。下面我想分享一个 古-月 的博客《ROS探索总结(十九)--如何配置机器人的导航功能》中有关cost_map代价地图配置的内容:

古月的博客:代价地图的配置 (local_costmap)& (global_costmap)

       导航功能包使用两种代价地图存储周围环境中的障碍信息,一种用于全局路径规划,一种用于本地路径规划和实时避障。两种代价地图需要使用一些共同和独立的配置文件:通用配置文件,全局规划配置文件,本地规划配置文件。以下将详细讲解这三种配置文件:

(1)通用配置文件(Common Configuration (local_costmap) &(global_costmap))

      代价地图用来存储周围环境的障碍信息,其中需要注明地图关注的机器人传感器消息,以便于地图信息进行更行。针对两种代价地图通用的配置选项,创建名为costmap_common_params.yaml的配置文件:

[html] view plain copy 在CODE上查看代码片派生到我的代码片
  1. obstacle_range: 2.5  
  2. raytrace_range: 3.0  
  3. footprint: [[x0, y0], [x1, y1], ... [xn, yn]]  
  4. #robot_radius: ir_of_robot  
  5. inflation_radius: 0.55  
  6.   
  7. observation_sources: laser_scan_sensor point_cloud_sensor  
  8.   
  9. laser_scan_sensor: {sensor_frame: frame_name, data_type: LaserScan, topic: topic_name, marking: true, clearing: true}  
  10.   
  11. point_cloud_sensor: {sensor_frame: frame_name, data_type: PointCloud, topic: topic_name, marking: true, clearing: true}  

      详细解析以上配置文件的内容:

[html] view plain copy 在CODE上查看代码片派生到我的代码片
  1. obstacle_range: 2.5  
  2. raytrace_range: 3.0  

       这两个参数用来设置代价地图中障碍物的相关阈值。obstacle_range参数用来设置机器人检测障碍物的最大范围,设置为2.5意为在2.5米范围内检测到的障碍信息,才会在地图中进行更新。raytrace_range参数用来设置机器人检测自由空间的最大范围,设置为3.0意为在3米范围内,机器人将根据传感器的信息,清除范围内的自由空间。

[html] view plain copy 在CODE上查看代码片派生到我的代码片
  1. footprint: [[x0, y0], [x1, y1], ... [xn, yn]]  
  2. #robot_radius: ir_of_robot  
  3. inflation_radius: 0.55  

       这些参数用来设置机器人在二维地图上的占用面积,如果机器人外形是圆形,则需要设置机器人的外形半径。所有参数以机器人的中心作为坐标(0,0)点。inflation_radius参数是设置障碍物的膨胀参数,也就是机器人应该与障碍物保持的最小安全距离,这里设置为0.55意为为机器人规划的路径应该与机器人保持0.55米以上的安全距离。

[html] view plain copy 在CODE上查看代码片派生到我的代码片
  1. observation_sources: laser_scan_sensorpoint_cloud_sensor  

     observation_sources参数列出了代价地图需要关注的所有传感器信息,每一个传感器信息都将在后边列出详细信息。

[html] view plain copy 在CODE上查看代码片派生到我的代码片
  1. laser_scan_sensor: {sensor_frame: frame_name, data_type:LaserScan, topic: topic_name, marking: true, clearing: true}  

       以激光雷达为例,sensor_frame标识传感器的参考系名称,data_type表示激光数据或者点云数据使用的消息类型,topic_name表示传感器发布的话题名称,而marking和clearing参数用来表示是否需要使用传感器的实时信息来添加或清楚代价地图中的障碍物信息。

(2)全局规划配置文件(Global Configuration (global_costmap))

        全局规划配置文件用来存储用于全局代价地图的配置参数,我们使用global_costmap_params.yaml来命名,内容如下:

[html] view plain copy 在CODE上查看代码片派生到我的代码片
  1. global_costmap:  
  2.  global_frame: /map  
  3.  robot_base_frame: base_link  
  4.  update_frequency: 5.0  
  5.   static_map:true  

     global_frame参数用来表示全局代价地图需要在那个参考系下运行,这里我们选择了map这个参考系。robot_base_frame参数表示代价地图可以参考的机器人本体的参考系。update_frequency参数绝地全局地图信息更新的频率,单位是Hz。static_map参数决定代价地图是否需要根据map_server提供的地图信息进行初始化,如果你不需要使用已有的地图或者map_server,最好将该参数设置为false。

(3)本地规划配置文件(Local Configuration (local_costmap))

       本地规划配置文件用来存储用于本地代价地图的配置参数,命名为local_costmap_params.yaml,内容如下:

[html] view plain copy 在CODE上查看代码片派生到我的代码片
  1. local_costmap:  
  2.  global_frame: odom  
  3.  robot_base_frame: base_link  
  4.  update_frequency: 5.0  
  5.  publish_frequency: 2.0  
  6.   static_map:false  
  7.  rolling_window: true  
  8.   width: 6.0  
  9.   height: 6.0  
  10.   resolution:0.05  

      "global_frame", "robot_base_frame","update_frequency", 和 "static_map"参数的意义与全局规划配置文件中的参数相同。publish_frequency设置代价地图发布可视化信息的频率,单位是Hz。rolling_window参数是用来设置在机器人移动过程中是否需要滚动窗口,以保持机器人处于中心位置。"width," "height," 和"resolution" 设置设置代价地图长(米)、高(米)和分辨率(米/格)。分辨率可以设置的与静态地图不同,但是一般情况下两者是相同的。






本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ROS 进阶学习笔记(16):ROS导航1:关于Costmap_2d Package (代价地图包) 的相关文章

  • 在我的 Mac 上使用 python 3.9 安装 Pandas 和 yfinance 时出现问题

    我正在尝试使用 python m pip install yfinance 命令来安装 yfinance 该命令引用了 python 3 9 0 当我尝试这样做时 我收到以下信息 Collecting yfinance Using cach
  • R:从包中覆盖函数的正确方法是什么?

    我使用的是 R 包 其中有 2 个函数 f1 和 f2 其中 f2 调用 f1 我想覆盖函数f1 由于 R 2 15 和包中命名空间的强制使用 如果我只是获取新函数 它确实可以在全局环境中使用 即 只需在控制台中调用 f1 x 即可返回新结
  • 防止安装具有特定包名的 Android 应用程序

    我正在使用 android studio 开发两个 Android 应用程序 出于某种原因 我希望其中一个应用程序可以安装在设备上 我想我应该检查第二个应用程序的包名称并阻止它安装 有什么办法可以做到这一点吗 谢谢 您无法阻止任何应用程序的
  • 软件包“syncwave”/“mvcwt”不可用(对于 R 版本 3.0.2)[重复]

    这个问题在这里已经有答案了 我想安装软件包mvcwt and SynchWave但收到以下消息 Warning message package mvcwt is not available for R version 3 0 2 Warni
  • Java 包结构中的模块与层

    我曾经把所有东西都放在这样的包中 com company app module1 com company app module2 但它使得基于包的 AOP 切入点变得困难 并导致需要 IDE 才能理解的巨大包 所以现在我意识到我需要一个更深
  • sensio/framework-extra-bundle 包已被放弃

    当我想将 symfony 从 6 1 升级到 6 2 时 我看到了这条消息 Package sensio framework extra bundle is abandoned you should avoid using it Use S
  • 使用“npm install”的漏洞问题

    我已经使用安装了一个快速服务器express coserver命令 然后我使用 npm install 命令来安装其他节点包 依赖项 但我得到了这个结果 npm audit security report Manual Review Som
  • Delphi:如果我在项目中使用包,为什么“使用调试 DCU”会变得无效?

    我正在构建一个使用 JVCL 插件系统的项目 该系统依赖于运行时 Delphi 包 自从我将它添加到我的项目中后 调试就变成了一场噩梦 因为我不再能够单步跟踪源代码任何 VCL 或 RTL 单元 它们在调试器中都被标记为灰点 当相关函数出现
  • 创建流而无需从中创建物理文件

    我需要创建一个包含服务器上存在的文档的 zip 文件 我使用 Net Package 类来执行此操作 并创建一个新的 Package 即 zip 文件 我必须具有物理文件或流的路径 我试图不创建一个实际的 zip 文件 而是创建一个存在于内
  • 如何安装我的自定义 Python 包及其自定义依赖项?

    我想找到一种方法来安装我自己的 python 包 该包依赖于其他自定义 python 包 我按照本指南创建了我自己的 python 包 https python packaging readthedocs iao en latest htt
  • “以下对象被‘package:xxx’屏蔽”是什么意思?

    当我加载包时 我收到一条消息 The following object is masked from package xxx 例如 如果我加载testthat http www rdocumentation org packages tes
  • 如何将我的包导入分组到单个自定义包中?

    通常当我编写 perl 程序时 我曾经包含以下包 use strict use warnings use Data Dumper 现在 我想像这样 我不会为每个程序都包含所有这个包 为了那个原因我会将这些全部打包在我自己的包中 喜欢跟随 m
  • go:找到模块但不包含包

    我正在尝试安装 go 的网络包 但收到 不包含包错误 终端截图 我咨询过 go 模块 latest 已找到但不包含包 https stackoverflow com questions 62974985 go module latest f
  • 在二进制 R 包中包含测试

    我在用testthat为我的 R 包编写单元测试 我见过一些软件包作者 比如来自Rcpp and ggplot2 使用二进制文件分发单元测试 但是 当我使用 RStudio 0 98 1102 构建包时devtools 1 7 0 test
  • 导入错误:无法导入名称“IntEnum”

    我正在尝试安装upstox 这是一个用于连接市场数据的 Python API 我无法在Python3 5上安装它 我的配置是Python 3 5 3 v3 5 3 1880cb95a742 Jan 16 2017 15 51 26 MSC
  • Python包不安装子模块

    我在 dev 分支中创建了一个具有以下结构的包 在验证包安装正确之前不会合并到 main mypackage init py setup py requirements txt module py subpackage one init p
  • 安装 ROS 时 Cmake 未检测到 boost-python

    我一直在尝试在我的 Mac 上安装 ROS 并根据不同版本的 boost 使用不同的库解决了错误 然而 似乎有一个库甚至没有检测到 boost python 这是我得到的错误 CMake Error at usr local share c
  • 已安装全局 NPM 包但未找到命令

    我已经全局安装了两个 npm 包 下载 https www npmjs com package download and 谜虚拟盒 https www npmjs com package enigmavirtualbox通过命令行 npm
  • 在包加载之前如何知道 R 中特定函数属于哪个包?

    例如 我知道许多流行的功能 例如tbl df 我通常不记得它属于哪个包 即data table or dplyr 所以我必须始终记住并加载一个包 但我做不到 tbl df除非我加载了正确的包 在 R 控制台本身加载或安装包之前 有没有办法知
  • 查找正在导入哪些 python 模块

    从应用程序中使用的特定包中查找所有 python 模块的简单方法是什么 sys modules是将模块名称映射到模块的字典 您可以检查其键以查看导入的模块 See http docs python org library sys html

随机推荐

  • 无线通信原理及协议栈(ZigBee、蓝牙等)解析

    1 天线 说起无线电通信 xff0c 不可不提起天线 在无线电设备中 xff0c 用来辐射和接收无线电波的装置称为天线 在发射端 xff0c 发射机产生的已调制的高频振荡电流 xff08 能量 xff09 经馈电 xff08 指被控制装置向
  • 串口Serial连接方式

    串口Serial连接方式 1 协议终端选择Serial 2 会话选项 xff0c 选择 串行 3 进入电脑 设备管理器 xff0c 查看USB Serial Port以及端口设置 串行选项根据端口设置配置 确定并连接即可
  • tcp/ip 协议栈实现2-socket文件系统

    core initcall sock init net socket c static int init sock init void int err Initialize sock SLAB cache sk init Initializ
  • VMware虚拟机安装Windows11(无需设置TPM密码)

    VMware虚拟机安装Windows11 xff08 无需设置TPM密码 xff09 注意 xff1a 需要新版VMware xff0c 目前小白的版本为 16 2 3 一 新建虚拟机向导 1 新建虚拟机 点击菜单栏文件 新建虚拟机 2 配
  • ROS相关:使用rospy 编写ros程序并使用rosbag存储数据

    为什么使用rospy ROS支持C 43 43 和Python xff0c 由于ROS的底层是由C 43 43 编写 xff0c 因此大多数的ROS程序都使用C 43 43 xff0c 但是Python语言接口简单 xff0c 更容易编写
  • C函数调用过程

    这几天在看GCC Inline Assembly xff0c 在C代码中通过asm或 asm 嵌入一些汇编代码 xff0c 如进行系统调用 xff0c 使用寄存器以提高性能能 xff0c 需要对函数调用过程中的堆栈帧 xff08 Stack
  • 【GitHub】Branches和Tags分别是做什么用的?

    在 GitHub 中 xff0c Branches xff08 分支 xff09 和 Tags xff08 标签 xff09 都是用于版本控制的重要工具 Branches xff08 分支 xff09 可以用来创建一个新的开发分支 xff0
  • git clone 指定分支

    我们在有一个工程的权限后 xff0c 按照常规操作去拉代码 xff0c 往往会拉到默认的master分支 若我们担心master分支拉下来后 xff0c 与其他代码有冲突 xff0c 想直接拉某分支的代码 xff0c 则该怎么操作呢 1 我
  • rocketmq的消息msgId和offsetMsgId

    1 rocketmq的消息发送时 xff0c producer客户端 生成msgId xff08 通过 ip 43 进程 43 自增值 43 当前与系统启动时间差值 xff09 xff0c 有另外的一个叫法uniqId 方法入口 xff1a
  • 算法 - 桶排序(Bucket Sort)

    执行流程 xff1a 创建一定数量的桶 xff08 比如用数组 链表作为桶 xff09 按照一定的规制 xff08 不同类型的数据 xff0c 规则不同 xff09 xff0c 将序列中的元素均匀分配到对应的桶分别对每个桶进行单独排序将所有
  • 测试Pangolin是否安装成功

    一 终端输入 cd Pangolin examples HelloPangolin cmake make HelloPangolin 二 显示这个结果则成功 三 顺便放一个 我可终于装完了ORB SLAM3 被内存不够折腾了好久 换个内存条
  • 交叉编译工具 aarch64-linux-gnu-gcc 的介绍与安装

    AArch64 是随 ARMv8 ISA 一起引入的 64 位架构 xff0c 用于执行 A64 指令的计算机 而且在 AArch64 状态下执行的代码只能使用 A64 指令集 xff0c 而不能执行 A32 或 T32 指令 但是 xff
  • 02 机器学习中的评估指标

    机器学习中的评估指标 1 机器学习的目标 根本目标 xff1a 在给定的训练数据上 xff0c 试图训练出能够归纳数据的规律的模型 xff0c 并且能在未知样本上也有好的效果 泛化能力强的模型最好 能很好地适用于未知样本 xff0c 如错误
  • 方便Git提交代码的几个工具

    团队使用git管理代码 xff0c 为了提交方便 xff0c 查看Log方便 xff0c 师傅告诉我先安装几个工具 xff0c 如下 xff1a cola gitk AnyEdit 一 gitk安装 xff08 备注 xff1a 开始我没走
  • git提交 本地分支和远程分支断开连接

    1级标题 当 git push origin branch name时遇到报错如下 xff1a fatal origin does not appear to be a git repository fatal Could not read
  • spring MVC中关于model.addAttribute的使用方法【翻译】

    关于model addAttribute的使用方法 http krams915 blogspot com 2010 12 spring 3 mvc using modelattribute in html 可能要 break the wal
  • ROS进阶学习手记 7 -- RViz仿真实例1

    任务2 xff1a 用simulator RViz 工具 xff0c 完成对小车的建模 xff0c 名字drive RViz 61 dvrv 用 dvrv node 发布topic和数据格式 xff0c 向它发送位置指令 xff0c 使它能
  • 在ROS 使用摄像头 WebCam 完成图像处理(1) -- 获取图像数据

    在ROS 使用摄像头 WebCam 完成图像处理 xff08 1 xff09 获取图像数据 我们要使用摄像头 xff0c 先要能看到摄像头图像 xff1a xff08 见附录 xff09 然后我们这里是参考 ros by example v
  • ROS进阶学习手记 10 - 用iRobot Create 2搭建自己的TurtleBot(1)- Introduction

    ROS进阶学习手记 10 搭建自己的TurtleBot xff08 1 xff09 Introduction 时隔一两个月 xff0c 再次回来继续写自己的ROS学习及应用手记 这一两个月里 xff0c 我并没有闲着 xff0c 而是照着
  • ROS 进阶学习笔记(16):ROS导航1:关于Costmap_2d Package (代价地图包)

    61 61 61 关于Costmap 2d Package 61 61 61 wiki page http wiki ros org costmap 2d 61 61 61 我遇到的问题 是 obstacle layer的刷新频率太低 61