0
$\begingroup$

Rosanswers logo

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
[1mstarted roslaunch server http://renascer:40983/[0m

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
[1mprocess[master]: started with pid [32022][0m
[1mROS_MASTER_URI=http://localhost:11311[0m
]2;/home/nut/catkin_ws/src/urdf_tutorial/urdf_sim_tutorial/launch/13-diffdrive.launch http://localhost:11311
[1msetting /run_id to 6ae2963a-b1ec-11e7-8a4c-e02a82110940[0m
[1mprocess[rosout-1]: started with pid [32035][0m
started core service [/rosout]
[1mprocess[gazebo-2]: started with pid [32059][0m
[1mprocess[gazebo_gui-3]: started with pid [32064][0m
[1mprocess[urdf_spawner-4]: started with pid [32069][0m
[1mprocess[robot_state_publisher-5]: started with pid [32070][0m
[1mprocess[rviz-6]: started with pid [32071][0m
[1mprocess[r2d2_controller_spawner-7]: started with pid [32072][0m
[1mprocess[rqt_robot_steering-8]: started with pid [32073][0m
[1m[urdf_spawner-4] process has finished cleanly
log file: /home/nut/.ros/log/6ae2963a-b1ec-11e7-8a4c-e02a82110940/urdf_spawner-4*.log[0m
[rviz-6] killing on exit
[rqt_robot_steering-8] killing on exit
[r2d2_controller_spawner-7] killing on exit
[robot_state_publisher-5] killing on exit
[gazebo-2] killing on exit
[gazebo_gui-3] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete

I also got this warning:

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
redefining global property: pi
when processing file: /home/nut/catkin_ws/src/urdf_tutorial/urdf_sim_tutorial/urdf/13-diffdrive.urdf.xacro
xacro.py is deprecated; please use xacro instead

Question: What is wrong and how can I fix it?

EDIT 1: Here goes the rqt_graph and rqt_tf_tree:

C:\fakepath\out2.png

I working on Xubuntu xenial as show bellow

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial

EDIT 2: After closely looking on what was happening I suspect that the problem is relate with the controller_manager or more precisely with the fact that it is not been launched. I suspect that because after

 roslaunch urdf_sim_tutorial 13-diffdrive.launch

this warning is sent

[WARN] [1508146098.264691, 117.159000]: Controller Spawner couldn't find the expected controller_manager ROS interface.n

To see if a I could reproduce it wit other reliable ros package I downloaded gazebo_ros_demo package and fired

 roslaunch rrbot_gazebo rrbot_world.launch
 
 roslaunch rrbot_control rrbot_control.launch

as said in its documentation and I got the same warning

[WARN] [1508146098.264691, 117.159000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

Following the thread gazebo-controller-spawner-warning I checked for the controller_manager services with

rosservice list | grep controller_manager

ang I get any match.


Originally posted by Randerson on ROS Answers with karma: 236 on 2017-10-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Randerson with karma: 236 on 2017-10-16

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.