ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Issue with the urdf_tutorial package and Rviz visualization (Problem may be related with the controller_manager).

asked 2017-10-15 16:13:12 -0600

Randerson gravatar image

updated 2017-10-16 05:24:53 -0600

gvdhoorn gravatar image

I am following the Learning URDF Step by Step tutorial which has the following step

  1. Building a Visual Robot Model with URDF from Scratch
  2. Building a Movable Robot Model with URDF
  3. Adding Physical and Collision Properties to a URDF
  4. Using Xacro to Clean Up a URDF File
  5. Using a URDF in Gazebo

and is based in the urdf_tutorial package.

Well, I was able to follow, understand and make it work as it should be until the step four (Using Xacro to Clean Up a URDF File). But I the fifth step (Using a URDF in Gazebo) although I understood the concepts from the documentation I was no able to make it work as it should in ROS + Rviz + Gazebo. Here goes self-explanatory picture

C:\fakepath\out1.png

As one can see, the robot visualization in Rviz is broken. This situation was created with the command

 roslaunch urdf_sim_tutorial 13-diffdrive.launch

that uses the urdf_tutorial package obtained from this git. The ros output is:

SpawnModel script started
[INFO] [1508101464.915792, 0.000000]: Loading model XML from ros parameter
[INFO] [1508101464.923230, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1508101465.533706, 0.087000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1508101465.920027, 0.254000]: Spawn status: SpawnModel: Successfully spawned entity
... logging to /home/nut/.ros/log/6ae2963a-b1ec-11e7-8a4c-e02a82110940/roslaunch-renascer-32008.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
]2;/home/nut/catkin_ws/src/urdf_tutorial/urdf_sim_tutorial/launch/13-diffdrive.launch
started roslaunch server http://renascer:40983/

SUMMARY
========

PARAMETERS
 * /r2d2_diff_drive_controller/angular/z/has_acceleration_limits: True
 * /r2d2_diff_drive_controller/angular/z/has_velocity_limits: True
 * /r2d2_diff_drive_controller/angular/z/max_acceleration: 6.0
 * /r2d2_diff_drive_controller/angular/z/max_velocity: 2.0
 * /r2d2_diff_drive_controller/base_frame_id: base_link
 * /r2d2_diff_drive_controller/left_wheel: ['left_front_whee...
 * /r2d2_diff_drive_controller/linear/x/has_acceleration_limits: True
 * /r2d2_diff_drive_controller/linear/x/has_velocity_limits: True
 * /r2d2_diff_drive_controller/linear/x/max_acceleration: 0.6
 * /r2d2_diff_drive_controller/linear/x/max_velocity: 0.2
 * /r2d2_diff_drive_controller/pose_covariance_diagonal: [0.001, 0.001, 0....
 * /r2d2_diff_drive_controller/publish_rate: 50
 * /r2d2_diff_drive_controller/right_wheel: ['right_front_whe...
 * /r2d2_diff_drive_controller/twist_covariance_diagonal: [0.001, 0.001, 0....
 * /r2d2_diff_drive_controller/type: diff_drive_contro...
 * /r2d2_diff_drive_controller/wheel_separation: 0.44
 * /r2d2_gripper_controller/joints: ['gripper_extensi...
 * /r2d2_gripper_controller/type: position_controll...
 * /r2d2_head_controller/joint: head_swivel
 * /r2d2_head_controller/type: position_controll...
 * /r2d2_joint_state_controller/publish_rate: 50
 * /r2d2_joint_state_controller/type: joint_state_contr...
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 30.0
 * /rosdistro: kinetic
 * /rosversion: 1.12.7
 * /rqt_robot_steering/default_topic: /r2d2_diff_drive_...
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    r2d2_controller_spawner (controller_manager/spawner)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    rqt_robot_steering (rqt_robot_steering/rqt_robot_steering)
    rviz (rviz/rviz)
    urdf_spawner (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [32022]
ROS_MASTER_URI=http://localhost:11311
]2;/home/nut/catkin_ws/src/urdf_tutorial/urdf_sim_tutorial/launch/13-diffdrive.launch http://localhost:11311
setting /run_id to 6ae2963a-b1ec-11e7-8a4c-e02a82110940
process[rosout-1]: started with pid [32035]
started core service [/rosout]
process[gazebo-2]: started with pid [32059]
process[gazebo_gui-3]: started with pid [32064]
process[urdf_spawner-4]: started with pid [32069]
process[robot_state_publisher-5]: started with pid [32070]
process[rviz-6]: started with pid [32071]
process[r2d2_controller_spawner-7]: started with pid [32072]
process[rqt_robot_steering-8]: started with pid [32073]
[urdf_spawner-4] process has finished cleanly
log file: /home/nut/.ros/log/6ae2963a-b1ec-11e7-8a4c-e02a82110940/urdf_spawner-4*.log
[rviz-6] killing ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-10-16 08:47:47 -0600

Randerson gravatar image

Well, finally I found the problem. It was the missing dependency

ros-kinetic-gazebo-ros-control.

The problem was caused by my faulty but how could I be aware of this dependency? I performed the installation

sudo apt-get install ros-kinetic-desktop-full

as recommended and I followed the instructions from the Learn URDF Step by Step in which there is no mention of the dependency in question.

Maybe one could edit a little bit this tutorial to add this information. I will see if I can do it.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-10-15 16:13:12 -0600

Seen: 452 times

Last updated: Oct 16 '17