1
votes

I was launching the techman robot on ros using the demo.launch. The first time when I launched it on rviz I could able to see the camera under by topic and I can see the video output. So I edited the moveit setup and added some poses to the robot. so when I launched again. now I could not find a camera under by topic. And I am very new to ros.enter image description here

and the following was my demo.launch file

<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>

and when I launch the gazebo.launch that was created by the moveit setup assistant I can see the camera from the gazebo platform into rviz

1
Looking for camera topics might be easier using the "by display type" tab, but it doesn't seem to be published. Can you share your launch-file? - Jere
ok i will edit the question and add the launch file here - Akash
while you're on it: Could you also share -> the command line output, ROS produces when the launch file is executed and -> the output of rostopic list? - Jere
I'm not sure I understand correctly. When you launch gazebo.launch, you CAN see the camera in rviz? What is missing then? :D - Jere
so let me brief it for you. first i tried to create a world in gazebo tried adding my robot into the world. when i tried that some parts of robots was not properly imported. So then i decided to create a world on rviz itself and placed some boxes. but when i launch both rviz only. i cannot see the camera topic. once i launch gazebo.launch on another terminal. i can see there is a topic on camera is publishing. when i try to add camera topic into rviz. i am getting the camera output from the gazebo world. i cannot get the camera output from the robot in rviz platform - Akash

1 Answers

0
votes

Have you launched Gazebo before or after launching your demo.launch? Try doing it the other way around!

It seems that Gazebo provides your camera-simulation. Rviz itself doesn't create the camera view, it just listens to a topic where a different engine (normally a robot, in your case the robot-simulation of Gazebo) publishes the images and then shows these images to you.

Rviz and Gazebo sometimes have trouble communicating based on which is started first.