Threadx_03:threadx的设备驱动

文章目录

0

设备驱动包含八个基本的函数模块,

  • Driver Initialization :该功能区负责初始化实际的硬件设备和内部数据驱动程序的结构。 调用驱动程序
    在初始化完成之前是不允许的。Typically, driver initialization is called from tx_application_define 。

  • Driver Control:驱动程序初始化并准备就绪后,该功能区域负责运行时控制。 通常,运行时控制包括对基础硬件设备的更改。示例包括更改串行的波特率设备或在磁盘上寻找新扇区。

  • Driver Access:某些设备驱动程序仅从单个调用应用程序线程。 在这种情况下,此功能区域不需要。 但是,在多个线程需要同时进行驱动程序访问,他们的互动必须通过添加分配/来控制释放设备驱动程序中的功能。 或者,应用程序可以使- 用信号量来控制驱动程序访问并避免额外的开销和复杂性在驱动程序内部。

  • Driver Input:该功能区负责所有设备输入。 与驱动程序相关的主要问题输入通常涉及如何缓冲输入,以及线程如何等待此类输入。Only threads are allowed to call the tx_sdriver_input function.

  • Driver Output:该功能区负责所有设备的输出。 与驱动程序输出相关的主要问题通常涉及如何缓冲输出以及线程如何等待执行输出。Only threads are allowed to call the tx_sdriver_output function.

  • Driver Interrupts:大多数实时系统依靠硬件中断来通知驱动程序设备的输入,输出,控制和错误事件。 中断提供了保证对此类外部事件的响应时间。 代替中断,驱动程序软件可能会定期检查这些事件的外部硬件。-

  • Driver Status:
    Current device status
    Input

TebLocalPlannerROS: odom_topic: odom # Trajectory teb_autosize: True dt_ref: 0.3 dt_hysteresis: 0.1 max_samples: 500 global_plan_overwrite_orientation: True allow_init_with_backwards_motion: True max_global_plan_lookahead_dist: 10 global_plan_viapoint_sep: -1 global_plan_prune_distance: 1 exact_arc_length: False feasibility_check_no_poses: 2 publish_feedback: False # Robot max_vel_x: 0.4 max_vel_x_backwards: 0.2 max_vel_y: 0.0 max_vel_theta: 0.3 # the angular velocity is also bounded by min_turning_radius in case of a carlike robot (r = v / omega) acc_lim_x: 0.5 acc_lim_theta: 0.5 # ********************** Carlike robot parameters ******************** min_turning_radius: 0.5 # Min turning radius of the carlike robot (compute value using a model or adjust with rqt_reconfigure manually) wheelbase: 0.4 # Wheelbase of our robot cmd_angle_instead_rotvel: True # stage simulator takes the angle instead of the rotvel as input (twist message) # ******************************************************************** footprint_model: # types: "point", "circular", "two_circles", "line", "polygon" type: "line" radius: 0.2 # for type "circular" line_start: [0.0, 0.0] # for type "line" line_end: [0.4, 0.0] # for type "line" front_offset: 0.2 # for type "two_circles" front_radius: 0.2 # for type "two_circles" rear_offset: 0.2 # for type "two_circles" rear_radius: 0.2 # for type "two_circles" vertices: [ [0.25, -0.05], [0.18, -0.05], [0.18, -0.18], [-0.19, -0.18], [-0.25, 0], [-0.19, 0.18], [0.18, 0.18], [0.18, 0.05], [0.25, 0.05] ] # for type "polygon" # GoalTolerance xy_goal_tolerance: 0.2 yaw_goal_tolerance: 0.1 free_goal_vel: False complete_global_plan: True # Obstacles min_obstacle_dist: 0.5 # This value must also include our robot's expansion, since footprint_model is set to "line". inflation_dist: 0.8 include_costmap_obstacles: True costmap_obstacles_behind_robot_dist: 1.0 obstacle_poses_affected: 20 dynamic_obstacle_inflation_dist: 0.6 include_dynamic_obstacles: True costmap_converter_plugin: "" costmap_converter_spin_thread: True costmap_converter_rate: 8 # Optimization no_inner_iterations: 5 no_outer_iterations: 4 optimization_activate: True optimization_verbose: False penalty_epsilon: 0.1 obstacle_cost_exponent: 4 weight_max_vel_x: 2 weight_max_vel_theta: 1 weight_acc_lim_x: 1 weight_acc_lim_theta: 1 weight_kinematics_nh: 1000 weight_kinematics_forward_drive: 1 weight_kinematics_turning_radius: 1 weight_optimaltime: 1 # must be > 0 weight_shortest_path: 0 weight_obstacle: 100 weight_inflation: 0.2 weight_dynamic_obstacle: 10 # not in use yet weight_dynamic_obstacle_inflation: 0.2 weight_viapoint: 1 weight_adapt_factor: 2 # Homotopy Class Planner enable_homotopy_class_planning: True enable_multithreading: True max_number_classes: 4 selection_cost_hysteresis: 1.0 selection_prefer_initial_plan: 0.95 selection_obst_cost_scale: 1.0 selection_alternative_time_cost: False roadmap_graph_no_samples: 15 roadmap_graph_area_width: 5 roadmap_graph_area_length_scale: 1.0 h_signature_prescaler: 0.5 h_signature_threshold: 0.1 obstacle_heading_threshold: 0.45 switching_blocking_period: 0.0 viapoints_all_candidates: True delete_detours_backwards: True max_ratio_detours_duration_best_duration: 3.0 visualize_hc_graph: False visualize_with_time_as_z_axis_scale: False # Recovery shrink_horizon_backup: True shrink_horizon_min_duration: 10 oscillation_recovery: True oscillation_v_eps: 0.1 oscillation_omega_eps: 0.1 oscillation_recovery_min_duration: 10 oscillation_filter_duration: 10 分析以上代码
05-21
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值