【发布时间】:2021-09-30 07:20:50
【问题描述】:
我正在使用 demo.launch 在 ros 上启动 techman 机器人。第一次在rviz上启动它时,我可以按主题看到相机,并且可以看到视频输出。所以我编辑了 moveit 设置并为机器人添加了一些姿势。所以当我再次启动时。现在我找不到按主题的相机。我对 ros 很陌生。
以下是我的 demo.launch 文件
<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>
当我启动 moveit 设置助手创建的gazebo.launch 时,我可以看到相机从gazebo 平台进入rviz
【问题讨论】:
-
使用“按显示类型”选项卡查找相机主题可能更容易,但似乎没有发布。你能分享你的启动文件吗?
-
好的,我将编辑问题并在此处添加启动文件
-
当你在上面时:你能不能也分享一下 -> 命令行输出,ROS 在启动文件执行时产生 ->
rostopic list的输出? -
我不确定我是否理解正确。当您启动
gazebo.launch时,您可以看到rviz中的摄像头吗?那缺少什么? :D -
所以让我为您简要介绍一下。首先,我尝试在凉亭中创建一个世界,尝试将我的机器人添加到这个世界中。当我尝试机器人的某些部分没有正确导入时。所以我决定在rviz本身上创建一个世界并放置一些盒子。但是当我只启动两个 rviz 时。我看不到相机主题。一旦我在另一个终端上启动gazebo.launch。我可以看到相机上有一个主题正在发布。当我尝试将相机主题添加到 rviz 中时。我正在从凉亭世界获取相机输出。我无法从 rviz 平台中的机器人获取相机输出
标签: ros