ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Updates for tf::MessageFilter example in geometry_tutorials

asked 2013-03-24 19:52:04 -0600

updated 2014-01-28 17:15:52 -0600

ngrennan gravatar image


I was trying to work through the tf tutorials, and had some issues when I got to the part about message filters. The tutorial refers to "turtle_tf_sensor.launch" which is not in the package. I am using Fuerte, and it appears that the file is also missing from Groovy. Also, this issue was previously raised, but I cannot see it being fixed.

I have recreated the missing launch file, and a python node that it runs, based on code from Box Turtle.

If you want me to submit a patch somewhere else please advise.

Missing file 1: geometry_tutorials/turtle_tf/launch/turtle_tf_sensor.launch

    <include file="$(find turtle_tf)/launch/turtle_tf_demo.launch" />
    <node name="turtle_pose_stamped_publisher" pkg="turtle_tf" type="" respawn="false" output="screen" /> 

Missing file 2: geometry_tutorials/turtle_tf/nodes/

[Note: this was modified from Box Turtle code to use Point instead of Pose to match the tutorial code]

#!/usr/bin/env python

import roslib
import rospy

import tf
import turtlesim.msg, turtlesim.srv
from geometry_msgs.msg import PointStamped, Point
from std_msgs.msg import Header

class PointPublisher:
    def handle_turtle_pose(self, msg, turtlename):, rospy.rostime.get_rostime(), "/world"), Point(msg.x, msg.y, 0)))

    def __init__(self):
        self.turtlename = "turtle3" #rospy.get_param('~turtle')
        self.sub = rospy.Subscriber('/%s/pose' % self.turtlename,
                         self.turtlename) = rospy.Publisher('turtle_point_stamped', PointStamped)

if __name__ == '__main__':
    spawner = rospy.ServiceProxy('spawn', turtlesim.srv.Spawn)
    spawner(4, 2, 0, 'turtle3')

    pp = PointPublisher()

    pub = rospy.Publisher("turtle3/command_velocity", turtlesim.msg.Velocity)
    while not rospy.is_shutdown():

It would also be great to add to the tutorial that the following lines should be added to CMakeLists.txt (assumes the file with code is named "turtle_msgfilter.cpp").

rosbuild_add_executable(turtle_msgfilter src/turtle_msgfilter.cpp)
rosbuild_link_boost(turtle_msgfilter signals)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-03-25 11:05:45 -0600

joq gravatar image

Thanks for the corrections, @dougbot01.

To update the ROS geometry stack:

  1. Create a new issue explaining the problem. Link to this question to avoid repetition.
  2. Fork the ros/geometry repository.
  3. Apply your changes.
  4. Submit a github pull request.

To update the wiki, log in and make those changes.

edit flag offensive delete link more


Thanks for pointing me in the right direction! My pull request was already merged into geometry_tutorials.

dougbot01 gravatar image dougbot01  ( 2013-04-01 18:38:16 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-03-24 19:52:04 -0600

Seen: 449 times

Last updated: Mar 25 '13