Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is how I, successfully, displayed your model on my computer(using rosdistro melodic).
a. I copy-pasted your urdf file in a file named "fourwheel.urdf" and placed it in a folder catkin_ws/src/own_urdf/urdf. I also added a tag "< /robot>" in the end.
b. I also copy-pasted your launch file in the launch folder of under "own_urdf" folder. I made following changes in your launch file.
   1) In first line changed pkgname and filename to as per my pkgname and urdf-file
   2) In 2nd line changed type and pkg to "joint_state_publisher_gui" (If you do not have this pkg, u can install it.)
   3) In third line changed type to "robot_state_publisher" instead of "state_publisher".
c. I ran the command "roslaunch own_urdf <yourlaunchfile>". A blank rviz window and a GUI for joint_state_publisher appeared.
d. In rviz window I changed the fixed_frame to "base_link" through drop-down arrow.
e. In the rviz window, I clicked "Add" to add the RobotModel and TF.
The robot model is now displaying correctly. If I move sliders on GUI window, the wheels in model in rviz window will appear to be turning. Since joint_f_l_wheel and joint_b_l_wheel are in front, you can see them better. You can zoom-in the model to see this movement more clearly. However, your robot will not move. Perhaps you need to add "transmission" to move the robot as a whole.