How to visualize using rviz on gazebo

asked 2020-03-17 07:31:49 -0600

billynugrahas gravatar image

updated 2020-03-18 04:03:13 -0600

mgruhler gravatar image

Hello, i want to do simulation on turtlebot3 using gazebo, i do succesfully run the world on gazebo. But if i want to visualizing on the rviz, using : rosrun rviz rviz, there is always error, (eg: on Robot Model, etc..). But if i run the rviz using roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch, there is no error.

Error on robot model: No transform from [base_link] to [odom]

Error on laserScan: For frame [base_scan]: Frame [base_scan] does not exist

I want to ask about that, what is the most important setting that the robot can visualize from the gazebo ? Because i want to do it manually from rosrun rviz rviz...

Thank you.

edit retag flag offensive close merge delete



Please edit your question and show the error message...

mgruhler gravatar image mgruhler  ( 2020-03-17 08:15:45 -0600 )edit

Done, Thank you..

billynugrahas gravatar image billynugrahas  ( 2020-03-17 21:37:05 -0600 )edit

try adding robot model from rviz.Maybe your rviz is searching for robots in a different topic.

ashutosh08 gravatar image ashutosh08  ( 2020-03-18 00:10:48 -0600 )edit

You say you

run the world on gaezebo

How do you do that? What are the commands you launch? The launch file you point to loads, among other things, the robot description from the urdf file to the parameter server and launches the robot_state_publisher. Those things provide the frames that are needed to transform the respective data into the correct frames. Those are the error messages you are seeing. They are all about non-existent transforms or frames, which are a requirement for rviz to properly visualize all the data.

mgruhler gravatar image mgruhler  ( 2020-03-18 04:08:21 -0600 )edit