[LINK TO TUTORIAL](http://wiki.ros.org/robot_state_publisher/Tutorials/Using%20the%20robot%20state%20publisher%20on%20your%20own%20robot)
I am trying to figure out how to publish my robot's state using the 'robot_state_publisher'.
I fortunately found the tutorial linked to above, but unfortunately the author was rather vague in their example of a launch file (copied below from the tutorial).
I would like to know if anyone can better explain what the difference is between 'robot_description' and 'different_robot_description' and exactly what information these are supposed to contain.
↧
What did the author of the "Using the robot state publisher on your own robot" tutorial intend by their launch file example?
↧
Multiple publishers on joint_states topic
Hi all,
I have two ROS nodes (one Hydro, the other Fuerte) that are publishing on the topic joint_states topic. The master is on Hydro and executes the node wit a PTU driver and the robot_state_publisher, the other one is running on the robot and publishes the joint states.
If I try to run them together, they overwrite each other (the last one wins). I would like to have them running together to have all the TFs without creating a collector node or putting the two nodes together. Is it possible?
The question was posed [here](http://answers.ros.org/question/9504/mixed-publishers-for-robot_state_publisher/) but the discussion is very old and I think that things changed from then.
↧
↧
Problem with robotino_node (state_publisher & URDF)
Hi.
So I use the openrobotino catkin package and if I do:
roslaunch robotino_node robotino_node.launch hostname:=172.26.1.1
I get:
... logging to /home/robotino/.ros/log/14d5aee0-0b63-11e4-a7b5-001377acf23d/roslaunch-tracking-R560-3803.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.
started roslaunch server [deleted because I can't publish links]
SUMMARY
========
PARAMETERS
* /robot_description
* /robot_state_publisher/publish_frequency
* /robotino_camera_node/cameraNumber
* /robotino_camera_node/hostname
* /robotino_laserrangefinder_node/hostname
* /robotino_laserrangefinder_node/laserRangeFinderNumber
* /robotino_mapping_node/hostname
* /robotino_node/downsample_kinect
* /robotino_node/hostname
* /robotino_node/leaf_size_kinect
* /robotino_node/max_angular_vel
* /robotino_node/max_linear_vel
* /robotino_node/min_angular_vel
* /robotino_node/min_linear_vel
* /robotino_odometry_node/hostname
* /rosdistro
* /rosversion
NODES
/
robot_state_publisher (robot_state_publisher/state_publisher)
robotino_camera_node (robotino_node/robotino_camera_node)
robotino_laserrangefinder_node (robotino_node/robotino_laserrangefinder_node)
robotino_mapping_node (robotino_node/robotino_mapping_node)
robotino_node (robotino_node/robotino_node)
robotino_odometry_node (robotino_node/robotino_odometry_node)
ROS_MASTER_URI=[link with localhost:11311]
core service [/rosout] found
process[robotino_node-1]: started with pid [3821]
process[robotino_odometry_node-2]: started with pid [3822]
process[robotino_laserrangefinder_node-3]: started with pid [3823]
process[robotino_camera_node-4]: started with pid [3824]
process[robot_state_publisher-5]: started with pid [3825]
process[robotino_mapping_node-6]: started with pid [3826]
[ INFO] [1405348121.106758117]: LaserRangeFinder0 connected to Robotino.
[ INFO] [1405348121.108033560]: Odometry connected to Robotino.
[ INFO] [1405348121.111381965]: Mapping connected to Robotino.
/opt/ros/hydro/lib/robot_state_publisher/state_publisher
[ WARN] [1405348121.446816650]: The 'state_publisher' executable is deprecated. Please use 'robot_state_publisher' instead
[ WARN] [1405348121.510280519]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.
[ INFO] [1405348123.615750085]: Camera0 connected to Robotino.
[ INFO] [1405348123.663682500]: RobotinoNode connected to Robotino.
Now I have looked in the launch file:
The robot_state_publisher is already used, so why the warning about the deprecated state_publisher?
I have already changed the URDF in the Catkin Workspace before, when I used a joystick to drive the Robotino around (and it worked, but I can't post how it looks now because I haven't sufficient karma to publish links and it contains links).
I don't know how to change the URDF (belonging to the API2?), I can't even find it.
I already asked the question in the openrobotino forum (without success so far), but I hope you can help me. Thanks.
↧
problems adding urdf frames to odom->base_link
I'm trying to use the slam_gmapping with my mobile robot but I'm having some troubles with the TF.
Firstly I created the robot driver so that it could broadcast the odom->base_link->base_laser (stamped) trasform and everything worked fine.
Problems came when I decided to add static frames to the TF tree. I'd like to use the URDF of my robot through the **robot_state_publisher** package and let the driver only broadcast the odom->base_link transform putting the definition of the base_laser on the URDF. Even if with **view_frames** all the frames are correctly linked, the TF tree seems broken. In fact on rviz I can't use odom as fixed frame because there's no trasform between odom and the other frames defined on the URDF.
Reading other questions, I understood that it's probably a synchronization problem but I did'n find any solution to this...so, please, help me! :)
↧
robot_state_publisher fixed frames 0.5s ahead
Hi guys,
The **robot_state_publisher** has 2 different mechanisms for publishing **moving** and **fixed** frames. Moving frames are published on **joint_states** callback.
Does anyone know why **robot_state_publisher** publishes the fixed frames using a timer independent from the **joint_states** subscriber and ahead of 0.5 seconds?
Could not find any valid reason whether from the internet or the code...
Thanks ;)
↧
↧
About robot_state_publisher + URDF
Hi everybody,
As stated in this [post](http://answers.ros.org/question/186976/how-to-combine-joint-state-publisher-with-urdf/) (see answer of Ahendrix) one should load the urdf model using the **param** tag in the launch file.
This is exact what happens in this [tutorial](http://wiki.ros.org/urdf/Tutorials/Using%20urdf%20with%20robot_state_publisher), where the author wrote in his launch file the following line of code:
That’s ok, but taking a look into the tutorial above I cannot figure out how the robot_state_publisher receives informations about joints defined in the URDF file.
My guess: I suppose that the joint_state variable, defined in the tutorial as:
20 sensor_msgs::JointState joint_state;
29 joint_state.name[0] ="swivel";
31 joint_state.name[1] ="tilt";
33 joint_state.name[2] ="periscope";
identifies the joint by name (as defined also in the URDF file). I m right?
One possibility is that names in the model correspond to the joint_state.name[k] in the broadcasted variable.
I can imagine that joint’names are loaded in the memory of the system by the launch command:
and later recognised by the robot_state_publisher:
By doing that and publishing datas on joint_state I can move my robot.
Is it like that, or I m wrong?
More: i really don t understand why he launched a second node with the command:
Why does he need 2 nodes?
Was the first not enough to load the URDF model of the robot and to publish joint_state position every 1/30th seconds?
Which is the relation between both nodes?
I think the tutorial is not clear, it doesn’t explain well enough how the package works, it just publishes an example. This is the most importa keypoint that should be understood in the tutorial.
Thanks!!!!
↧
laser_frame not moving
I have the following scheme in simulation enviroment with Gazebo and Rviz:
laser_frame -> base_link -> base_stabilized -> base_footprint -> odom -> map -> world
laser_frame to base_link is provided by robot_state_publisher looking up in the urdf file
base_link -> base_stabilized -> base_footprint -> odom is provided by a 'message_to_tf' node that takes ground_truth topic with z axis and rotation to publish this transformations
odom -> map is provided by a mapper node setting up the transforms in x-axis and y-axis
map -> world is provided by a node doing a static/fixed transform
In Rviz we have as fixed frame and target frame the /world frame.
World is fixed, map is fixed refering to world, odom is moving in x,y,z and rotation refering to map BUT base_footprint, base_link and therefore laser_frame arent moving. They keep as they started.
How can I fix it? What am I missing?
Thanks
↧
Requiring deep understanding of robot_state_publisher and TF
Hi all,
I have turtlebot2, groovy, turtlebot arm. In reading the tutorial Using urdf with [robot_state_publisher](http://wiki.ros.org/urdf/Tutorials/Using%20urdf%20with%20robot_state_publisher), I'm confused in its launch file.
**Why there are two "state_publishers" ?**
one is "`robot_state_publisher`", and the other is "`state_publisher`")
By saying "***need a method for specifying what state the robot is in***" the tutorial points out the function of "`state_publisher`",
But in checking [robot_state_publisher](http://wiki.ros.org/robot_state_publisher) package we can see the function of `robot_state_publisher` is "**allows you to publish the state of a robot to tf**", which seems similar to the function of "`state_publisher`".
My goal is to broadcaster TF info, so my turtlebot arm can do grasping based on it(which have tf listening function). I have a URDF of turtlebot with arm.
Thanks for your help!
↧
Rviz "No transform from [] to []" without /joint_states
Hi,
I'm trying to display a robot using rviz, and when I start up the visualizer it gives me a plethora of "no transform from [link_1] to [link_2]" errors under the RobotModel tab if I'm not publishing to the /joint_states topic as rviz starts.
I'm trying to run the visualizer, then run rosbag and view it. The problem is, unless I run rosbag right as I'm starting up the visualizer I get these errors. I've got a subscriber taking the rosbag messages and publishing /joint_states with the data.
The odd thing is, when I took that subscriber and published an initial one-off [0, 0, 0, 0, 0, 0] message (formatted as it would be for an actual message, with the same joint names and everything) I got the same errors.
Any ideas? Thanks!
↧
↧
Adding two robots in gazebo tfs problem and urdf files
I want to add two robots in gazebo.
The first robot is a quadrotor from hector package
the second robot is husky
I used apt-get to download both of then except the husky_description. I used git clone "link"
I changed in the mesh file of the husky.
My launch file is the following:
The husky_spwan.launch file is the following:
freq: 10.0
sensor_timeout: 1.0
publish_tf: true
odom_used: true
vo_used: true
output_frame: /world
the box.launch file only launch the gazebo client and server.
first I faced a problem becasue both robots have two links with the smae names. Therefore, I changed in the urdf file of the husky from base_footprint to husky_foot_print and from base_link into husky_base link. ( I dont know if what I did it write or wrong)
Anyway, when I run the quad rotor alone and I check the tf I find all the tfs and links and joints that are specified in the urdf file for the quad rotor.
Also, when I run the husky alone I find all its links and joints.
but when I run them together as the shown in the launch file above the links that their parent is the "base_link" in the quadrotor disapear from the tf tree.
Also, I dont know what is the fixed frame for the husky or from where to spacey it ?? if I want it to be the world frame as for the quad rotor what should I do ??
Also, there is a node that is called robot_state_publisher >> should I call it twice for each robot or once for both ?? because it exist in the launch file of the hector_quadrotor and also you can see it in the launch file for the husky ??
Actually I could not run if the two robot_state_publisher nodes so I had the following:
This node I added it in the launch file of husky:
this node exist in the launch file of the quadrotor:
↧
stageros old tf time stamps
Hi,
I am trying to run a simulation of Pioneer 3DX robot using p2os-vanderbilt, gmapping, stageros and rviz on ROS Hydro, Ubuntu 12.04.
The simulation and visualisation works fine however I am getting errors when trying to set a fixed frame to /map in RViz like:
> No transform from [right_wheel_joint]> to [map]
I checked a tf tree with view_frames and I see that all parts/joints exproted from URDF are in the same tree with odom, base_link and world. However for transforms published by stageros and gmapping the most recent time is eg. 1419.950 while for transforms published by robot_state_publisher it is 1413910747.904
The same is when I run for example
> rosrun tf tf_echo map top_plate
I am getting following error:
>Failure at 1593.300000000>Exception thrown:Lookup would require extrapolation into the past. Requested time 1593.300000000 but the earliest >data is at time 1413910921.103968092, when looking up transform from frame [top_plate] to frame [map]
I have no idea what is the reason of such time stamps difference between these tranforms, everything is runned on a single computer on localhost.
Here you can check frames.pdf generated with view_frames:
(https://dl.dropboxusercontent.com/u/21812390/frames.pdf)
The URDF file I am using is the same as in p2os_urdf package.
Thanks in advance for any help!
Filip
↧
How to make rviz model follow joint states with MoveIt?
Hello everyone,
I have the following problem:
I successfully configured moveit for my robot. Now I want my rviz visualization to follow the robot movement, hence when the robot moves, it shoult move as well.
What I do:
I have a joint_states topic on which the current joint states are published. Then I feed these into a robot_state_publisher calculating tf for my robot.
But it moveit/rviz seems not to care. I can plan and execute (send to controller) my movements from rviz but no matter what the joint states are, the visualization never moves.
So what am I missing? Is there something special I should have took care of?
Thank you for your time, Marcel
↧
robot_state_publisher link publish frequency not consistent
I have a urdf model of a human hand in Rviz for which I update its position via my own tf broadcaster. I have noticed that when I move the hand the fingers lag behind the wrist. I am updating the position of the wrist at 100 Hz and in my launch file, I set the parameter of robot_state_publisher to 100 Hz as well.100
When I look at the rate at wich the tf frames are being published (from rosrun tf view_frames) the update of the palm (first link) is at 100 Hz and the last link "pinky_dof_4" is also updated at 100 Hz. However everything in between is being updated at **10 Hz**. I would like to get all links in the URDF to be updated at 100 Hz.

↧
↧
Rviz reporting no fixed frame
I'm trying to complete the [robot state publisher tutorial](http://www.romin.upm.es/wiki/index.php?title=ROS%3ATutorials/Robot_State_Publisher), but when I run:
roslaunch myrobot_description myrobot_rviz.launch
Rviz shows no model and in the left-hand panel reports the error "Fixed Frame [map] does not exist".
myrobot.urdf.xarco:
myrobot_rviz.launch:
I googled that error, and other pages claim the it means there's no base_link defined in my model, but there clearly is. What am I doing wrong?
Edit: I changed my launch file to:
and now call it like:
roslaunch myrobot_description myrobot_rviz.launch model:='$(find myrobot_description)/urdf/myrobot.urdf.xacro'
and that makes the model show in Rviz, but it doesn't look any different from a the other xacrodisplay launches the tutorial goes over. Is the tutorial incomplete, or am I overlooking some steps? It says I need to have a "source that publishes the joint positions" but doesn't explain how to do that. Is that a a node I have to implement myself?
↧
MoveIt joint_state_publisher not publishing to robot_state_publisher
I am working on a 7-DOF manipulator with MoveIt and have calculated a series of joint vectors. I want to publish these joint vectors to the **joint states topic** so as to see the visualization in Rviz. However, after the implementation I did see the visualization in Rviz but there were "jumping backs" to the original manipulator configuration from time to time. I went into the problem and found that the correct messages were being published to the **joint states topic**, but **robot_state_publisher** was not receiving these messages, so no new tfs were updated (the manipulator still stayed at the original configuration, I think this is why there were "jumping backs") .
As a test, I used the **joint_state_publisher GUI** to publish messages to the **joint states topic** and I did see tf updates from **robot state publisher**. So what I do not understand is why publishing using GUI results in new tfs but publishing using codes does not.
I checked and ensured there were **joint_state_publisher** and **robot_state_publisher** nodes running and **robot_state_publisher** node did subscribe to the **joint states topic**.
Any ideas would be greatly appreciated!
↧
robot_state_publisher: symbol lookup error
Hi all,
for some reason, robot_state_publisher does not work anymore. When I run it, I get:
/opt/ros/indigo/lib/robot_state_publisher/robot_state_publisher
/opt/ros/indigo/lib/robot_state_publisher/robot_state_publisher: symbol lookup error: /opt/ros/indigo/lib/robot_state_publisher/robot_state_publisher: undefined symbol: _ZN4urdf5Model9initParamERKSs
I completely purged all ROS packages and dependencies, and reinstalled many times. No changes.
Looks like a missing library somewhere, but I can't figure out which one.
I have Ubuntu 14.04 + ROS Indigo.
↧
update system, robot_state_publisher process always die
Hi, all
I have meet a strange problem. I just update something in my system yesterday under the upgrade pushing notify and also used the command sudo apt-get update , But today all my ros project with rviz simulation can not work. These ros project do work well before.The phenomenon can be seen as follows.
system:ROS indigo
robot_state_publisher : ros-indigo-robot-state-publisher ,version: 1.10.4-0trusty-20150430-1718-+0000
joint_state_publisher: ros-indigo-joint-state-publisher, version:1.11.7-0trusty-20150429-0827-+0000
1. roslaunch SIA20_moveit_config moveit_planning_execution.launch
started roslaunch server http://XXX-ThinkPad-T500:47915/
SUMMARY
========
PARAMETERS
* /controller_joint_names: ['joint_s', 'join...
* /mongo_wrapper_ros_XXX_ThinkPad_T500_9935_3121796978277564489/database_path: /home/XXX/industr...
* /mongo_wrapper_ros_XXX_ThinkPad_T500_9935_3121796978277564489/overwrite: False
* /move_group/allow_trajectory_execution: True
* /move_group/capabilities: move_group/MoveGr...
* /move_group/controller_list: [{'default': True...
* /move_group/controller_manager_name: pr2_controller_ma...
* /move_group/controller_manager_ns: pr2_controller_ma...
..............................
[robot_state_publisher-4] process has died [pid 10035, exit code -11, cmd /home/XXX/catkin_ws/devel/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/XXX/.ros/log/72142730-009f-11e5-9cf8-00226811834c/robot_state_publisher-4.log].
log file: /home/XXX/.ros/log/72142730-009f-11e5-9cf8-00226811834c/robot_state_publisher-4*.log
the moveit rviz GUI can be seen as followed.the GUI shows
Global Status:warn
Fixed frame: no tf data. Actual error: Fixed Frame[base_link] does not exist**
But this is warning is incredible,you know the project can work well before, then I recheck the *.srdf file. I have fixed the base_link:
virtual_joint name="FixedBase" type="fixed" parent_frame="world" child_link="base_link"
I have no idea about that,So, I check the system in-build pr2's demo.launch. the pr2 can also work well before
2. roslaunch pr2_moveit_config demo.launch
process[robot_state_publisher-4]: started with pid [27667]
[ WARN] [1432314173.999282162]: TF to MSG: Quaternion Not Properly Normalized
[robot_state_publisher-4] process has died [pid 27667, exit code -11, cmd /home/XXX/catkin_ws/devel/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/XXX/.ros/log/21c9d20c-00a4-11e5-bb8c-00226811834c/robot_state_publisher-4.log].
log file: /home/XXX/.ros/log/21c9d20c-00a4-11e5-bb8c-00226811834c/robot_state_publisher-4*.log
[robot_state_publisher-4] restarting process
process[robot_state_publisher-4]: started with pid [27692]
[ WARN] [1432314174.317632982]: TF to MSG: Quaternion Not Properly Normalized
[robot_state_publisher-4] process has died [pid 27692, exit code -11, cmd /home/XXX/catkin_ws/devel/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/XXX/.ros/log/21c9d20c-00a4-11e5-bb8c-00226811834c/robot_state_publisher-4.log].
log file: /home/XXX/.ros/log/21c9d20c-00a4-11e5-bb8c-00226811834c/robot_state_publisher-4*.log
[robot_state_publisher-4] restarting process........................
what is the matter with this. I have searched the internet try my best, but no problems seem like this.
so I try to update again
XXX@XXX-ThinkPad-T500:~$ sudo apt-get update
[sudo] password for XXX:
Ign http://dk.archive.ubuntu.com trusty InRelease
Ign http://dk.archive.ubuntu.com trusty-updates InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://ppa.launchpad.net trusty InRelease
Ign http://dk.archive.ubuntu.com trusty-backports InRelease
Hit http://dk.archive.ubuntu.com trusty Release.gpg
Hit http://ppa.launchpad.net trusty Release.gpg
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Get:2 http://dk.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:3 http://dk.archive.ubuntu.com trusty-backports Release.gpg [933 B]
Get:4 http://security.ubuntu.com trusty-security Release [63,5 kB]
......
Hit http://dk.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://dk.archive.ubuntu.com trusty-backports/universe Translation-en
Get these erro, is it nomal????
Err http://archive.ubuntukylin.com:10006 trusty InRelease
Err http://archive.ubuntukylin.com:10006 trusty Release.gpg
Unable to connect to archive.ubuntukylin.com:10006:
Fetched 3.154 kB in 2min 0s (26,1 kB/s)
W: Failed to fetch http://archive.ubuntukylin.com:10006/ubuntukylin/dists/trusty/InRelease
W: Failed to fetch http://archive.ubuntukylin.com:10006/ubuntukylin/dists/trusty/Release.gpg Unable to connect to archive.ubuntukylin.com:10006:
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
What shall I do........,should I reinstall the whole ros system???
↧
↧
robot_state_publisher with SDF Files
Hi all,
I just want to ask about the support of robot_state_publisher with SDF Files, can we use it to broadcast the state of the robot to the TF Transform Library using SDF Files (not URDF Files).
One related link: http://answers.ros.org/question/61097/using-robot_state_publisher-with-a-sdf-file/ but it is couple of years old and I was wondering whether there has been any change.
Thanks.
Naman
↧
Robot state publisher has died error code -7
Hi, recently I upgraded my ODROID XU3 using apt-get and since then I haven't been able to launch robot state publisher which is crucial for my finals project. Whenever I want to launch my launch file, it always died with error code -7 and when I use rosrun for robot state publisher it returned 'Bus error' to the terminal.
1. Is there a quick solution to this?
2. If not, is there an alternative to robot state publisher? I intend to use my robot for gmapping, and I haven't been able to run robot state publisher in a separate machine like my laptop and connect to the ODROID that contains the gmapping, freenect, and differential drive package. It ended up with no mapping data received and the robot model has plenty of errors.
3. Is there an old ROS repository that I can download and replace the one in my ODROID?
Really need help real quick, it was stupid of me to update when I had the whole thing worked out, now I'm screwed.
↧
Robot_state_publisher dies on ARM-based Turtlebot
Whenever I run `roslanch turtlebot_bringup minimal.launch` I get the following error:
[robot_state_publisher-2] process has died [pid 1597, exit code -11, cmd /opt/ros/indigo/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/odroid/.ros/log/02472614-0afe-11e5-884e-c22209f25fe8/robot_state_publisher-2.log].
log file: /home/odroid/.ros/log/02472614-0afe-11e5-884e-c22209f25fe8/robot_state_publisher-2*.log
The log file is empty, however. If I run `rosrun robot_state_publisher robot_state_publisher` I get a segmentation fault. When I compile and run `robot_state_publisher` using gdb, here's the seg fault info:
Starting program: /home/odroid/catkin_ws/devel/lib/robot_state_publisher/robot_state_publisher
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0xb660bc74 in ?? () from /lib/arm-linux-gnueabihf/libpcre.so.3
I'd imagine this is because I'm running everything on an Odroid U3 with Ubuntu 14.04 and [ROS Indigo Ubuntu ARM](http://wiki.ros.org/indigo/Installation/UbuntuARM). Anyone else have this issue?
↧