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

extract, alter, publish

asked 2018-11-14 10:05:30 -0500

girpon gravatar image

hey everyone,

im forever trying to subscribe to a topic (gazebo/link_states) alter the info and publish it again so i can use it for other nodes.

however. i cant get it to work with a seperate subscriber and publisher, as the subscriber node doesnt, obviously, publish any data. and neither do i succeed with a publisher node alone. because; how do i extract info from the link_states topic in a publisher node without having to use a rospy.subscriber?

ive been trying for over 4 hours and cant seem to figure it out, is the whole publisher/subscriber approach wrong?

any answers are welcome!

greetings girpon

edit retag flag offensive close merge delete

Comments

2

You need to put publisher and subscriber in the same node.

ahendrix gravatar image ahendrix  ( 2018-11-14 11:00:12 -0500 )edit

@ahendrix: why did you post that as a comment?

gvdhoorn gravatar image gvdhoorn  ( 2018-11-14 13:41:37 -0500 )edit

I posted as a comment because it's not a complete answer; it doesn't include or link to documentation about how to use publishers and subscribers in the same node.

ahendrix gravatar image ahendrix  ( 2018-11-14 16:25:46 -0500 )edit

Ok. True. But it is most likely the answer :)

gvdhoorn gravatar image gvdhoorn  ( 2018-11-15 08:57:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-15 09:18:25 -0500

girpon gravatar image

Ok i fixed it. Thanks anyway!

edit flag offensive delete link more

Comments

1

It would be valuable for future readers if you could edit your answer and explain what you did and why, and how that solved your problem.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-15 09:46:00 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-11-14 10:05:30 -0500

Seen: 137 times

Last updated: Nov 15 '18