Robotics StackExchange | Archived questions

loading urdf to rviz problem

Hello, guys. I am a beginner in ROS and I ran into some problem while I was trying to build a SolidWorks 3D model, export it as URDF and visualize the model for trajectory planning in RViz.

First, I was able to export my SolidWorks model as URDF. Then I created a catkin workspace, copy-pasted my urdf folder containing my robot model, configured my catkin workspace and sourced it according to the tutorial.

Then, I used roslaunch to run my display.launch file in RViz. However, I'm getting an error here which says

Global status: Error
Fixed Frame: Fixed Frame [map] does not exist

To solve this issue, I googled and found this code:

rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 map my_frame 100

So I ran it on a separate terminal and the problem went away. (I still don't know what the problem was and how this code solved it so if you could explain it, I would appreciate it.)

After that, I could click "Add" and "Motion Planning" to load the 3D model into the space. However, all the functions (MotionPlanning, PlanningScene, etc.) have oragne warning sign which says "Status:Warn"

Can anybody please explain me what the problem is? Thank you.

Asked by pluma615 on 2020-06-04 07:41:19 UTC

Comments

Hi @pluma615,

RViz is just a visualization tool and it needs a Fixed frame to render properly all things in ROS space. You can change this value in the Global options > Fixed Frame menu in the left panel of the GUI. Hence, you do not need to publish a static transform to visualize properly, you can just change the fixed frame to a known (existent) frame your robot_description is generating. I assume you tf_tree is properly set, you can check it by using the command: rosrun rqt_tf_tree rqt_tf_tree. Since the map frame does not exist in your tf tree rviz is unable to apply the proper transformation for all the rest of the robot_description frames, thus Rviz is unable to render it.

As for the other warning, it can be your tfs are not properly generated or you have a missed connection somewhere. At this point is really difficult to debug your problem if you do not provide enough information or any file that we can check to cope with it.

Asked by Weasfas on 2020-06-05 06:21:17 UTC

The same solution as the one stated in my other comment applies with the answer updated. Rviz is just a visualization tool that uses the TF information to display ROS data. If there is not a proper tf tree set up that connects the frame "map" with your "base_link" any data displayed in Rviz with a Fixed frame: "map" will not going to be properly drawn. Just take a look at the frames convention.

Asked by Weasfas on 2022-03-26 07:49:14 UTC

Answers