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

forrestv's profile - activity

2016-12-20 03:07:43 -0500 received badge  Great Answer (source)
2014-08-21 05:40:34 -0500 received badge  Good Answer (source)
2014-02-22 09:26:36 -0500 commented answer subscribing and publishing to a twist message

Hah, yep ... I'm going to blame missing that on the (previously) horrible code formatting.

2014-02-22 08:16:04 -0500 commented question subscribing and publishing to a twist message

Format your code correctly; all lines should be indented an additional 4 spaces.

2014-02-21 17:52:51 -0500 answered a question subscribing and publishing to a twist message

You should be making your publisher within the global scope, not within the callback. (Though that wouldn't create the problem you describe; it would result in no messages being published.)

2013-12-06 19:28:34 -0500 received badge  Critic (source)
2013-11-13 03:03:20 -0500 received badge  Nice Answer (source)
2013-08-01 17:18:41 -0500 received badge  Nice Answer (source)
2013-08-01 16:22:57 -0500 answered a question How to get topic from a message

Make bag take two arguments, the topic name and the message, and then change that code to:

map(lambda x: x.unregister(), SUBSCRIPTIONS)
SUBSCRIPTIONS = map(lambda topic: rospy.Subscriber(topic, AnyMsg, lambda msg: bag(topic, msg)), TOPICS)
2013-07-30 21:28:28 -0500 received badge  Teacher (source)
2013-07-30 12:15:34 -0500 answered a question How to write a node to communicate with USB?

Look at PySerial examples.

2013-07-30 12:00:26 -0500 answered a question Quaternion transformations in Python

To convert from a numpy array to a Quaternion message type, it's just:

q = numpy.array([.5, .5, .5, .5])
from geometry_msgs.msg import Quaternion
pub.publish(Quaternion(*q))

Converting from the message type to a numpy array is harder and I could never find a provided function, so I usually do:

xyzw_array = lambda o: numpy.array([o.x, o.y, o.z, o.w])
print xyz_array(msg.pose.orientation)
2012-12-11 20:35:24 -0500 commented answer How to visualize Point cloud ?

It's the frame that rviz transforms everything into to display it, the world frame. You don't have a tf between /velodyne and /map or something, so you need to tell it to use /velodyne as the world frame.

2012-12-08 15:56:55 -0500 answered a question How to visualize Point cloud ?

Change the "fixed frame" at the top of rviz's config to /velodyne

2012-11-29 03:42:42 -0500 received badge  Supporter (source)