ros-simulation / gazebo_ros_demos

Example robots and code for interfacing Gazebo with ROS
347 stars 225 forks source link

No tf data. Actual error: Fixed Frame [world] does not exist #11

Closed chrisspen closed 8 years ago

chrisspen commented 9 years ago

The code for the ROS Control tutorial does not work at all on Indigo. Forking this code unmodified and then running the roslaunch commands as specified in the tutorial:

roslaunch rrbot_gazebo rrbot_world.launch
roslaunch rrbot_control rrbot_control.launch
rosservice call /rrbot/controller_manager/load_controller "name: 'joint1_position_controller'"
rosservice call /rrbot/controller_manager/load_controller "name: 'joint2_position_controller'"
rosservice call /rrbot/controller_manager/switch_controller "{start_controllers: ['joint1_position_controller','joint2_position_controller'], stop_controllers: [], strictness: 2}"
rosservice call /rrbot/controller_manager/switch_controller "{start_controllers: [], stop_controllers: ['joint1_position_controller','joint2_position_controller'], strictness: 2}"
rosrun rviz rviz

results in a frozen Gazebo window with the simulation frozen half-way consuming 100% CPU, and a blank RViz window. Setting "fixed frame" to world and then adding a RobotModel display type, as specified by the tutorial, results in the error:

No tf data.  Actual error: Fixed Frame [world] does not exist

along with errors in the RobotModel complaining about no tf for every link.

Also, the example commands don't appear to have any effect, although the tutorial doesn't explain what effect the commands are supposed to have, so it's unclear what I should be looking for. If I had to guess, I'd say they were specifying joint angles in radians, but in that case I'd expect the joints to move in Gazebo after I ended those commands, and nothing happened. Is that the expected output?

I did not modify any code from gazebo_ros_demos, so I'm not sure why the results differed so greatly from the written tutorial. The previous sections of the ROS+Gazebo tutorial worked just fine. I tested on Ubuntu 14.04 with Indigo and Gazebo 2.

Output from roslaunch rrbot_gazebo rrbot_world.launch:

Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:54352/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: indigo
 * /rosversion: 1.11.10
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    urdf_spawner (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [20232]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to ec92b508-0040-11e5-b029-0026bb1b90cc
process[rosout-1]: started with pid [20245]
started core service [/rosout]
process[gazebo-2]: started with pid [20269]
process[gazebo_gui-3]: started with pid [20273]
process[urdf_spawner-4]: started with pid [20279]
Gazebo multi-robot simulator, version 2.2.3
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Gazebo multi-robot simulator, version 2.2.3
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master.[ INFO] [1432271457.338698443]: Finished loading Gazebo ROS API Plugin.
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.8.11
[ INFO] [1432271457.369132535]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
spawn_model script started
[INFO] [WallTime: 1432271457.900563] [0.000000] Loading model xml from ros parameter
[INFO] [WallTime: 1432271457.908647] [0.000000] Waiting for service /gazebo/spawn_urdf_model

Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.8.11
[ INFO] [1432271458.406589586, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1432271458.464723503, 0.081000000]: Physics dynamic reconfigure ready.
[INFO] [WallTime: 1432271458.542130] [0.153000] Calling service /gazebo/spawn_urdf_model
[ INFO] [1432271459.327209546, 0.325000000]: Camera Plugin (robotNamespace = /), Info: Using the 'robotNamespace' param: '/'
[INFO] [WallTime: 1432271459.333244] [0.325000] Spawn status: SpawnModel: Successfully spawned model
[ INFO] [1432271459.424091635, 0.325000000]: Camera Plugin (ns = /)  <tf_prefix_>, set to ""
[ INFO] [1432271459.576031346, 0.325000000]: Laser Plugin (robotNamespace = /), Info: Using the 'robotNamespace' param: '/'
[ INFO] [1432271459.576311137, 0.325000000]: Starting GazeboRosLaser Plugin (ns = /)!
[ INFO] [1432271459.598536987, 0.325000000]: GPU Laser Plugin (ns = /) <tf_prefix_>, set to ""
[ INFO] [1432271459.599036090, 0.325000000]: Loading gazebo_ros_control plugin
[ INFO] [1432271459.603747371, 0.325000000]: Starting gazebo_ros_control plugin in namespace: /rrbot
[ INFO] [1432271459.603947284, 0.325000000]: LoadThread function completed
[ INFO] [1432271459.622785128, 0.325000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [/robot_description] on the ROS param server.
[ INFO] [1432271460.224092991, 0.325000000]: Loaded gazebo_ros_control.
[urdf_spawner-4] process has finished cleanly
log file: /home/chris/.ros/log/ec92b508-0040-11e5-b029-0026bb1b90cc/urdf_spawner-4*.log
Warning [Publisher.cc:134] Queue limit reached for topic /gazebo/default/pose/local/info, deleting message. This warning is printed only once.
Warning [Publisher.cc:134] Queue limit reached for topic /gazebo/default/physics/contacts, deleting message. This warning is printed only once.
ghost commented 9 years ago

Could probably be closed either.

chrisspen commented 9 years ago

What? I don't understand your response.

ghost commented 9 years ago

Oh yeah, sorry, it was a bit quick.

I have installed recently ROS Indigo and Gazebo from scratch and had no issue with the tutorial that you mention. As you have closed the issue #8 which was related to the installation of the simulator, I guessed that this one could also be closed.

Just a guess, it could totally be wrong.

chrisspen commented 9 years ago

Issue #8 was a different problem in a different section of the tutorial. I'm now running a fresh install of Indigo+Gazebo 2 on Ubuntu 14.04, which is the recommended setup and I'm getting a different error. The tutorial seems to be missing several steps, and a lot of the code it shows doesn't match what's in gazebo_ros_demos, so I'm not sure if I'm following the correct instructions.

Am I launching the components correctly? What would be causing the fixed frame error? Should the RViz 3d view show the same thing as Gazebo?

ghost commented 9 years ago

I had to install the packages for the controllers:

sudo apt-get install ros-indigo-effort-controllers
sudo apt-get install ros-indigo-joint-state-controller

I have used RQT to control the RRBot and not the command lines:

rosrun rqt_gui rqt_gui

What are your errors?

j-rivero commented 8 years ago

Looks like no feedback has been provided for the last 6 months. Please reopen if you can reproduce the bug with any of the current ROS versions.