推广及建设网站北京网站优化公司哪家好
清单:
一个路由器;
幻尔机器人1台;
一个在gazebo中的虚拟机器人tbmn_01一台。
网络配置
查看无线接口名称
ip link
我的接口是wlp3s0
连上wifi扫描当前局域网下ip(wlp3s0)
sudo arp-scan --interface= wlp3s0 --localnet
ssh链接小车
ssh wheeltec@192.168.31.161
成功ssh链接上终端
查看主机ip
hostname -I
这一行设置了 ROS Master 的 URI(统一资源标识符)。ROS Master 是ROS网络的中心协调点,负责处理节点之间的通信。每个ROS节点都需要知道ROS Master的位置。
ROS Master URI 是ROS Master节点的地址,其他节点通过这个地址与ROS Master进行通信。
所以所有的终端都要输入
export ROS_MASTER_URI=http://192.168.31.253:11311
这一行设置了 ROS节点的主机名。每个ROS节点需要一个唯一的主机名,以便于在ROS网络中识别和通信。
export ROS_HOSTNAME=192.168.31.253
我要把节点放在pc端所以
需要在wheeltec的终端下输入主机的ip(所有的终端都输入)
export ROS_HOSTNAME=192.168.31.161
pc终端
export ROS_HOSTNAME=192.168.31.253
克隆文件夹到本地
sudo scp -r wheeltec@192.168.31.161:~/wheeltec_robot/src/ /mnt/ros1_7000
对于我来说最难分的就是主机和从机
时间同步问题
主机跟从机都要输入
sudo service ntp restart # 重启 NTP 服务
从机上的终端也要使用仿真时间
export ROS_USE_SIM_TIME=true
或者navigation.launch文件中加上
<param name="use_sim_time" value="true"/>
查看时间
date
工作空间修改记录~/wheeltec_robot/src/turn_on_wheeltec_robot
gedit launch/include/teb_local_planner.launch
<launch>
<!-- 迷你机器人,基础参数 --><arg name="robot_name" default="wheeltec_01" /><arg name="scan_topic" default="scan" /><arg name="odom_topic" default="odom_combined" /><arg name="cmd_vel_topic" default="cmd_vel" />
<!-- TF坐标变换,基础参数wxf --><arg name="laser_frame_id" default="laser" /><arg name="global_frame_id" default="$(arg robot_name)/map" /><arg name="base_frame_id" default="base_link" /><arg name="odom_frame_id" default="$(arg robot_name)/odom_combined" /><!-- Arguments参数 --><arg name="car_mode" default="" /><!-- 导航路径规划公共参数 --><rosparam file="$(find turn_on_wheeltec_robot)/params_nav_common/move_base_params.yaml" command="load" ns="move_base"/><rosparam file="$(find turn_on_wheeltec_robot)/params_nav_common/base_global_planner_param.yaml" command="load" ns="move_base"/><!-- 导航TEB局部路径规划器参数 --><param name="move_base/base_local_planner" type="string" value="teb_local_planner/TebLocalPlannerROS"/><rosparam file="$(find turn_on_wheeltec_robot)/params_nav_common/teb_local_planner_params.yaml" command="load" ns="move_base"/><!-- 导航代价地图公共参数 --><rosparam file="$(find turn_on_wheeltec_robot)/params_costmap_common/costmap_common_params.yaml" command="load" ns="move_base/global_costmap"/><rosparam file="$(find turn_on_wheeltec_robot)/params_costmap_common/costmap_common_params.yaml" command="load" ns="move_base/local_costmap"/><rosparam file="$(find turn_on_wheeltec_robot)/params_costmap_common/local_costmap_params.yaml" command="load" ns="move_base"/><rosparam file="$(find turn_on_wheeltec_robot)/params_costmap_common/global_costmap_params.yaml" command="load" ns="move_base"/><!-- 启动导航节点 --><node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"><!-- 导航代价地图与路径规划器对应车型参数 --><rosparam file="$(find turn_on_wheeltec_robot)/params_costmap_car/param_$(arg car_mode)/teb_local_planner_params.yaml" command="load"/><rosparam file="$(find turn_on_wheeltec_robot)/params_costmap_car/param_$(arg car_mode)/costmap_car_params.yaml" command="load" ns="global_costmap" /><rosparam file="$(find turn_on_wheeltec_robot)/params_costmap_car/param_$(arg car_mode)/costmap_car_params.yaml" command="load" ns="local_costmap" />
<!--wxf--><param name="base_global_planner" value="TC_planner/TCPlannerROS" /> <!-- reset frame_id parameters using user input data --><param name="global_costmap/global_frame" value="$(arg global_frame_id)" /><param name="global_costmap/robot_base_frame" value="$(arg base_frame_id)" /><param name="local_costmap/global_frame" value="$(arg odom_frame_id)" /><param name="local_costmap/robot_base_frame" value="$(arg base_frame_id)" /><!-- 我多点规划的参数设置 --><!-- <param name="mark" value="1" /> --><!-- 设置base_global_planner,注意这里是/不是:: --><!-- <param name="base_global_planner" value="AC_planner/ACPlannerROS" />--><!-- <param name="DWAPlannerROS/global_frame_id" value="$(arg odom_frame_id)" /> --><!-- <remap from="cmd_vel" to="$(arg cmd_vel_topic)" /> --><!-- <remap from="odom" to="$(arg odom_topic)" /> --><!-- <remap from="scan" to="$(arg scan_topic)" /> --></node></launch>
gedit launch/robot_model_visualization.launch
相关工具代码
<launch>
<!--wxf--><arg name="robot_name" default="wheeltec_01" /><!-- Arguments参数 --><arg name="car_mode" default="" /><arg name="if_voice" default="false"/><!-- 用于robot_state_publisher节点--><node pkg="tf" type="static_transform_publisher" name="base_to_link" args="0 0 0 0 0 0 $(arg robot_name)/base_footprint base_link 100" /><!--坐标变换,需要实测 --><!--阿克曼系列 --><!-- car_mode and tf mini_akm--><group if="$(eval car_mode == 'mini_akm')"><!-- 用于雷达节点,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.125 0.00 0.15 3.14 0 0 base_footprint laser 100" /><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.185 0.00 0.1 0 0 0 base_footprint camera_link 100" /><!-- 用于robot_pose_ekf节点,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_akm--><group if="$(eval car_mode == 'senior_akm')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.26 0.00 0.228 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.34 0.00 0.178 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_akm_bs--><group if="$(eval car_mode == 'top_akm_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.53 0.00 0.278 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.59 0.00 0.228 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_akm_dl--><group if="$(eval car_mode == 'top_akm_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.52 0.00 0.350 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.58 0.00 0.30 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!--麦轮系列 wxf 加了$(arg robot_name)/--><!-- car_mode and tf mini_mec--><group if="$(eval car_mode == 'mini_mec')"><!-- 用于雷达节点,后面同理不再赘述--><!-- <node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.06 0.00 0.20 3.14 0 0 base_footprint laser 100" /> --><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.06 0.00 0.20 3.14 0 0 $(arg robot_name)/base_footprint laser 100" /><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><!-- <node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.12 0 0.15 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /> --><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.12 0 0.15 0 0 0 $(arg robot_name)/base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 $(arg robot_name)/base_footprint gyro_link 100" /></group><!-- car_mode and tf mini_mec_moveit--><group if="$(eval car_mode == 'mini_mec_moveit_four')"><!-- 用于雷达节点,后面同理不再赘述--><!--node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.925 0 0 base_footprint laser 100" /--> <!--A2 laser--><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.14 0 0 base_footprint laser 100" /> <!--A1 laser--><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="-0.118 0 0.50 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><group if="$(eval car_mode == 'mini_mec_moveit_six')"><!-- 用于雷达节点,后面同理不再赘述--><!--node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.925 0 0 base_footprint laser 100" /--> <!--A2 laser--><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.11 3.14 0 0 base_footprint laser 100" /> <!--A1 laser--><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="-0.118 0 0.55 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_mec_bs--><group if="$(eval car_mode == 'senior_mec_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.12 0.00 0.165 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.18 0 0.115 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_mec_dl--><group if="$(eval car_mode == 'senior_mec_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.18 0.00 0.32 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.27 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_mec_bs--><group if="$(eval car_mode == 'top_mec_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.18 0.00 0.32 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.27 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_mec_dl--><group if="$(eval car_mode == 'top_mec_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.18 0.00 0.32 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.27 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_mec_EightDrive--><group if="$(eval car_mode == 'senior_mec_EightDrive')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.26 0.00 0.23 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.320 0 0.18 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_mec_EightDrive--><group if="$(eval car_mode == 'top_mec_EightDrive')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.26 0.00 0.23 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.320 0 0.18 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf flagship_mec_dl--><group if="$(eval car_mode == 'flagship_mec_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.20 0.00 0.34 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.27 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf flagship_mec_bs--><group if="$(eval car_mode == 'flagship_mec_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.20 0.00 0.34 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.27 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!--全向轮系列 --><!-- car_mode and tf mini_omni--><group if="$(eval car_mode == 'mini_omni')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.015 0.00 0.17 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.075 0.00 0.12 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_omni--><group if="$(eval car_mode == 'senior_omni')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.09 0.00 0.25 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.15 0.00 0.20 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_omni--><group if="$(eval car_mode == 'top_omni')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.18 0.00 0.28 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.24 0.00 0.23 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!--四驱系列 --><!-- car_mode and tf mini_4wd--><group if="$(eval car_mode == 'mini_4wd')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.06 0.00 0.20 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.12 0 0.15 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf mini_4wd_moveit_four--><group if="$(eval car_mode == 'mini_4wd_moveit_four')"><!-- 用于雷达节点,后面同理不再赘述--><!--node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.925 0 0 base_footprint laser 100" /--> <!--A2 laser--><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.14 0 0 base_footprint laser 100" /> <!--A1 laser--><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="-0.118 0 0.50 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf mini_4wd_moveit_six--><group if="$(eval car_mode == 'mini_4wd_moveit_six')"><!-- 用于雷达节点,后面同理不再赘述--><!--node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.925 0 0 base_footprint laser 100" /--> <!--A2 laser--><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.14 0 0 base_footprint laser 100" /> <!--A1 laser--><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="-0.118 0 0.50 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_4wd_bs--><group if="$(eval car_mode == 'senior_4wd_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.12 0.00 0.228 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.18 0 0.178 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_4wd_dl--><group if="$(eval car_mode == 'senior_4wd_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.18 0.00 0.36 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.31 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_4wd_bs--><group if="$(eval car_mode == 'top_4wd_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.18 0.00 0.36 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.31 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf top_4wd_dl--><group if="$(eval car_mode == 'top_4wd_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.18 0.00 0.37 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.240 0 0.32 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group>
<!-- car_mode and tf flagship_4wd_bs--><group if="$(eval car_mode == 'flagship_4wd_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="-0.05 0.00 0.364 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.01 0.00 0.324 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf flagship_4wd_dl--><group if="$(eval car_mode == 'flagship_4wd_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="-0.05 0.00 0.364 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.01 0.00 0.324 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!--差速系列 --><!-- car_mode and tf mini_tank--><group if="$(eval car_mode == 'mini_tank')"><!-- 用于雷达节点,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.04 0.00 0.21 3.14 0 0 base_footprint laser 100" /><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.1 0.00 0.16 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf mini_tank_moveit--><group if="$(eval car_mode == 'mini_tank_moveit_four')"><!-- 用于雷达节点,后面同理不再赘述--><!--node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.925 0 0 base_footprint laser 100" /--> <!--A2 laser--><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.048 0.00 0.18 3.14 0 0 base_footprint laser 100" /> <!--A1 laser--><!-- 用于摄像头相关节点,如3d建图导航,后面同理不再赘述--><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="-0.118 0 0.50 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf mini_diff--><group if="$(eval car_mode == 'mini_diff')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.125 0.00 0.16 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.185 0.00 0.11 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf senior_diff--><group if="$(eval car_mode == 'senior_diff')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.23 0.00 0.20 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.29 0.00 0.15 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf four_wheel_diff_bs--><group if="$(eval car_mode == 'four_wheel_diff_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="-0.05 0.00 0.36 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.01 0.00 0.31 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf four_wheel_diff_dl--><group if="$(eval car_mode == 'four_wheel_diff_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="-0.05 0.00 0.36 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.01 0.00 0.31 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf flagship_four_wheel_diff_dl--><group if="$(eval car_mode == 'flagship_four_wheel_diff_dl')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="-0.05 0.00 0.36 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.01 0.00 0.31 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf flagship_four_wheel_diff_bs--><group if="$(eval car_mode == 'flagship_four_wheel_diff_bs')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="-0.05 0.00 0.36 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.01 0.00 0.31 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="0 0 0 0 0 0 base_footprint gyro_link 100" /></group><!-- car_mode and tf brushless_senior_diff--><group if="$(eval car_mode == 'brushless_senior_diff')"><node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.036 0.00 0.26 3.14 0 0 base_footprint laser 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.073 0.00 0.34 0 0 0 base_footprint camera_link 100" /><node pkg="tf" type="static_transform_publisher" name="base_to_gyro" args="-0.194 -0.092 0.22 0 0 0 base_footprint gyro_link 100" /></group><!-- URDF 标准化机器人描述格式 --><!--阿克曼系列 --><group if="$(eval car_mode == 'mini_akm')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_akm_robot.urdf"/> </group><group if="$(eval car_mode == 'senior_akm')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/senior_akm_robot.urdf"/> </group><group if="$(eval car_mode == 'top_akm_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/top_akm_bs_robot.urdf"/> </group><group if="$(eval car_mode == 'top_akm_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/top_akm_dl_robot.urdf"/> </group><!--麦轮系列 wxf--><group if="$(eval car_mode == 'mini_mec')"><param name="robot_description" textfile="$(find turn_on_wheeltec_robot)/urdf/mini_mec_robot.urdf"/><!-- <param name="robot_name" value="$(arg robot_name)"/> --></group><group if="$(eval car_mode == 'mini_mec_moveit_four')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_mec_moveit_four.urdf"/> </group><group if="$(eval car_mode == 'mini_mec_moveit_six')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_mec_moveit_six.urdf"/> </group><group if="$(eval car_mode == 'senior_mec_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/senior_mec_robot.urdf"/> </group><group if="$(eval car_mode == 'senior_mec_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/senior_mec_dl_robot.urdf"/> </group><group if="$(eval car_mode == 'top_mec_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/top_mec_bs_robot.urdf"/> </group><group if="$(eval car_mode == 'top_mec_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/top_mec_dl_robot.urdf"/> </group><group if="$(eval car_mode == 'senior_mec_EightDrive' or car_mode == 'top_mec_EightDrive')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mec_EightDrive_robot.urdf"/> </group><group if="$(eval car_mode == 'flagship_mec_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/flagship_mec_dl_robot.urdf"/> </group><group if="$(eval car_mode == 'flagship_mec_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/flagship_mec_bs_robot.urdf"/> </group><!--全向轮系列 --><group if="$(eval car_mode == 'mini_omni')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_omni_robot.urdf"/> </group><group if="$(eval car_mode == 'senior_omni')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/senior_omni_robot.urdf"/> </group><group if="$(eval car_mode == 'top_omni')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/top_omni_robot.urdf"/> </group><!--四驱系列 --><group if="$(eval car_mode == 'mini_4wd')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_4wd_robot.urdf"/> </group><group if="$(eval car_mode == 'mini_4wd_moveit_four')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_4wd_moveit_four.urdf"/> </group><group if="$(eval car_mode == 'mini_4wd_moveit_six')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_4wd_moveit_six.urdf"/> </group><group if="$(eval car_mode == 'senior_4wd_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/senior_4wd_bs_robot.urdf"/> </group><group if="$(eval car_mode == 'senior_4wd_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/senior_4wd_dl_robot.urdf"/> </group><group if="$(eval car_mode == 'top_4wd_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/top_4wd_bs_robot.urdf"/> </group><group if="$(eval car_mode == 'top_4wd_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/top_4wd_dl_robot.urdf"/> </group><group if="$(eval car_mode == 'flagship_4wd_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/flagship_4wd_bs_robot.urdf"/> </group><group if="$(eval car_mode == 'flagship_4wd_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/flagship_4wd_dl_robot.urdf"/> </group><!--差速系列 --><group if="$(eval car_mode == 'mini_tank')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_4wd_robot.urdf"/> </group><group if="$(eval car_mode == 'mini_tank_moveit_four')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_tank_moveit_four.urdf"/> </group><group if="$(eval car_mode == 'mini_diff')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/mini_diff_robot.urdf"/> </group><group if="$(eval car_mode == 'senior_diff')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/senior_diff_robot.urdf"/> </group><group if="$(eval car_mode == 'four_wheel_diff_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/four_wheel_diff_bs_robot.urdf"/> </group><group if="$(eval car_mode == 'four_wheel_diff_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/four_wheel_diff_dl_robot.urdf"/> </group><group if="$(eval car_mode == 'flagship_four_wheel_diff_dl')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/flagship_four_wheel_diff_dl_robot.urdf"/></group><group if="$(eval car_mode == 'flagship_four_wheel_diff_bs')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/flagship_four_wheel_diff_bs_robot.urdf"/></group><group if="$(eval car_mode == 'brushless_senior_diff')"><param name = "robot_description" textfile = "$(find turn_on_wheeltec_robot)/urdf/brushless_senior_diff.urdf"/> </group><!-- 读取urdf信息(robot_description) 发布话题:/joint_states--><node unless="$(eval (car_mode=='mini_mec_moveit_six' or car_mode=='mini_4wd_moveit_six') and if_voice==true)" name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" /><!-- 订阅话题:/joint_states,发布小车TF信息--><node unless="$(eval (car_mode=='mini_mec_moveit_six' or car_mode=='mini_4wd_moveit_six') and if_voice==true)" name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" /></launch>
gedit launch/include/robot_pose_ekf.launch
<launch>
<arg name="robot_name" default="wheeltec_01" /><!--选择cartogapher算法时不开启滤波节点--><arg name="is_cartographer" default="false"/><!-- Robot pose ekf 拓展卡尔曼滤波--><node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf" output="screen" unless="$(arg is_cartographer)"><!-- <param name="output_frame" value="odom_combined"/> <param name="base_footprint_frame" value="base_footprint"/>--><!-- wxf s --><param name="output_frame" value="$(arg robot_name)/odom_combined"/><param name="base_footprint_frame" value="base_footprint"/><!-- wxf e --><param name="freq" value="30.0"/><param name="sensor_timeout" value="2.0"/><param name="odom_used" value="true"/><param name="imu_used" value="true"/><param name="vo_used" value="false"/><remap from="imu_data" to="imu" /></node></launch>
rosrun rqt_tf_tree rqt_tf_tree