How to reuse Gazebo Simulation TurtleBot3 ROS Stack to work for real robot?
I am trying to make a TurtleBot like robot which uses Lidar(Slamtech RpLidar A2) and IMU sensor (SparkFun Razor M0 9DOF)
Key differences between TurtleBot and my robot are that
- My robot has no camera ( neither RGB nor depth ) sensor.
- My robot uses Slamtech RpLidar A2.
PROBLEM
/odom topic that contains pose (position and orientation) is published directly by gazebo node. I can get orientation data from IMU but I can't get position data. How can I use IMU data along with RpLidar scans to publish messages to /odom topic.
Any Suggestions that can be tested directly with gazebo simulation are more appreciated as gazebo node also publishes simulated /imu topic messages
My Current Simulated Implimentation:
Use URDF of TurtleBot Waffle Model by running command
export TURTLEBOT3_MODEL=waffle
Run TurtleBot3 Gazebo Simulation world by running command
roslaunch turtlebot3_gazebo turtlebot3_house.launch
Run TurtleBot Navigation and rViz Visualisation by running command
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/ros/tb3_house_map.yaml
The Node/Topics running in this simulation are in the following DOT file: link text
Dot file can be opened by using
rosrun rqt_graph rqt_graph
Progress so far :
Because I want to run a real robot, I don't roslaunch turtlebot3_gazebo turtlebot3_house.launch
Therefore, the /gazebo topic that publishes /odom, /joint_states and /scan topics is absent.
I have successfully created launch files for emulating /scan topic from RpLidar
I also get data from IMU sensor over /imu of typical message type sensor_msgs/Imu
I also created custom URDF for my robot so /joint_states is published.
But I cannot emulate /odom topic.