Launch file from ros-orb-slam2 to build the map and robot localization in Rviz is not working.

asked 2018-06-02 07:14:49 -0600

Astronaut gravatar image

updated 2018-06-11 03:07:57 -0600

Hi

Im using the ros-orb-slam2, the ROS Publisher Node using ORB-SLAM. as is says that ORB_SLAM2 offers build file for ROS, but it doesn't broadcast any message, so other packages can not utilize it. So I made a launch file to show the map and localization of my robot in 3D. The bag file is made from mp4 video of the Crane hook block moving . This is my launch file I used

<?xml version="1.0"?>
<launch>
 <arg name="orbslam_setting_path" default="$(find orb_slam2)/conf/fpvcam.yaml" />
  <!--arg name="orbslam_setting_path" default="$(find orb_slam2)/Examples/Monocular/TUM1.yaml" />-->
  <node name="rosplay" pkg="rosbag" type="play" args="/home/me/video1.bag --clock"/>

  <!-- include file="$(find video_stream_opencv)/launch/video_file.launch" required="true">-->
  <!-- /include> -->

    <node name="orb_slam2" pkg="orb_slam2" type="orb_slam2_mono" output="screen" required="true">
        <param name="camera" value="/camera/image_raw" />
        <param name="path_vocabulary" value="/home/me/catkin_ws/src/ORB_SLAM2/Vocabulary/ORBvoc.txt" />
        <param name="path_settings" value="$(arg orbslam_setting_path)" />
        <!-- param name="path_settings" value="/home/me/catkin_ws/src/ros-orb-slam2/conf/fpvcam.yaml" />-->
        <param name="use_viewer" type="bool" value="true" />
    </node>

    <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="log">
        <remap from="camera" to="/camera/image_raw"/>
        <!-- param name="camera" value="videofile_frame" /> -->
        <!-- remap from="/image" to="/orb_slam2/Frame" /> -->
    <!-- param name="camera" value="/camera/image_raw" />-->
        <param name="autosize" value="true" />
    </node>

 <node pkg="tf" type="static_transform_publisher" name="baselink_broadcaster" args="0 0 0 0 0 0 1  $(arg cf_frame/crazyflie/base_link 100" />
         <param name="robot_description" command="$(find xacro)/xacro.py $(find crazyflie_description)/urdf/crazyflie.urdf.xacro" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find crazyflie_demo)/launch/crazyflie_pos.rviz" required="true" />  
</launch>

Its starting the RVIZ but no map and no pose is showing. Actually I got error in the RVIZ RobotModel. Please any help what is wrong with my launch file. Im usin g Ubuntu 16.04 and ROS kinetic. And I can build the ros-orb-slam2 package

Thanks

edit retag flag offensive close merge delete