我想让rviz上的机器人发布相机主题。而不是露台。因为我正面临一些错误,产卵机器人在凉亭platfrom.But,我不知道为什么发射的机器人在rviz平台不公布的相机主题。
<launch>
<!-- specify the planning pipeline -->
<arg name="pipeline" default="ompl" />
<!-- By default, we do not start a database (it can be large) -->
<arg name="db" default="false" />
<!-- Allow user to specify database location -->
<arg name="db_path" default="$(find new_techman)/default_warehouse_mongo_db" />
<!-- By default, we are not in debug mode -->
<arg name="debug" default="false" />
<!-- By default, we will load or override the robot_description -->
<arg name="load_robot_description" default="true"/>
<!-- Set execution mode for fake execution controllers -->
<arg name="execution_type" default="interpolate" />
<!--
By default, hide joint_state_publisher's GUI
MoveIt!'s "demo" mode replaces the real robot driver with the joint_state_publisher.
The latter one maintains and publishes the current joint configuration of the simulated robot.
It also provides a GUI to move the simulated robot around "manually".
This corresponds to moving around the real robot without the use of MoveIt.
-->
<arg name="use_gui" default="false" />
<arg name="use_rviz" default="true" />
<!-- If needed, broadcast static tf for robot root -->
<!-- We do not have a robot connected, so publish fake joint states -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" unless="$(arg use_gui)">
<rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
</node>
<node name="joint_state_publisher" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" if="$(arg use_gui)">
<rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
</node>
<!-- Given the published joint states, publish tf for the robot links -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
<!-- Run the main MoveIt! executable without trajectory execution (we do not have controllers configured by default) -->
<include file="$(find new_techman)/launch/move_group.launch">
<arg name="allow_trajectory_execution" value="true"/>
<arg name="fake_execution" value="true"/>
<arg name="execution_type" value="$(arg execution_type)"/>
<arg name="info" value="true"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="pipeline" value="$(arg pipeline)"/>
<arg name="load_robot_description" value="$(arg load_robot_description)"/>
</include>
<!-- Run Rviz and load the default config to see the state of the move_group node -->
<include file="$(find new_techman)/launch/moveit_rviz.launch" if="$(arg use_rviz)">
<arg name="rviz_config" value="$(find new_techman)/launch/moveit.rviz"/>
<arg name="debug" value="$(arg debug)"/>
</include>
<!-- If database loading was enabled, start mongodb as well -->
<include file="$(find new_techman)/launch/default_warehouse_db.launch" if="$(arg db)">
<arg name="moveit_warehouse_database_path" value="$(arg db_path)"/>
</include>
</launch>这是我的rviz启动文件
发布于 2021-07-25 14:55:38
但我不知道为什么在rviz平台上发射机器人不发布相机主题。
这很简单:因为Rviz是一个可视化工具,最初不是用来模拟虚拟环境的。换句话说:它可以向你展示机器人所看到的东西,但它并不假装是机器人。发布一个摄像机主题基本上意味着,Rviz中的可视化机器人假装自己看到了什么:Rviz-世界。
因为我在露台上产卵机器人时遇到了一些错误。
除了Rviz之外,Gazebo是一个非常好的选择,可以模拟一个机器人,也可以设计一个模拟的机器人-摄像机可以看到和发布的环境。如果你在制造机器人时遇到麻烦,你可能应该寻找一种解决这个问题的方法,而不是尝试使用Rviz作为模拟工具。
但是,确实有一种方法可以使用Rviz进行模拟,就像这里所说的那样。
流发布在rviz中呈现的图像。它至少是用玉石建造的,但很可能是在水和靛蓝中起作用的,然后沿着叉子向后走,就会有一个前猫皮的版本。 它需要一个输入camera_info来获得相机的本质和分辨率。失真系数被忽略,但是实现http://code.opencv.org/issues/1387的类似http://code.opencv.org/issues/1387的节点可以处理下游的失真系数。(露台摄像机支持失真了吗?http://gazebosim.org/tutorials?tut=ca..。说5.0版有) 输入camera_info主题和输出图像主题在rviz插件gui中设置。 旧建议: 一个棘手的解决方案是运行屏幕抓取节点罗斯并将rviz窗口定位到原来的位置,尽管它非常脆弱,而且很难用启动文件实现自动化。
https://stackoverflow.com/questions/68509569
复制相似问题