Ask Your Question
0

How to connect a topic to a node [closed]

asked 2017-11-12 15:00:06 -0600

alienmonster gravatar image

updated 2017-11-12 23:50:10 -0600

image description

I have a node /gazebo which publishes the topic /main/image_raw. I have another node /whycon which publishes several topics /whycon/poses etc. But i want the /whycon node to subscribe to the topic /main/image_raw. But I cant find any way to do that can somebody help me solve this problem.

EDIT: The /whycon and the /gazebo node is not made by me. These were already there when I downloaded the whycon and task_1 package.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by jayess
close date 2017-11-13 19:56:03.165596

Comments

What have you tried so far? Can you please post the code? Also, are you using C++, Python, or another of the supported languages?

jayess gravatar imagejayess ( 2017-11-12 23:02:27 -0600 )edit

The whycon node is not made by me so i cant subscribe it to the /main/image_raw topic . So where do I put the new node I make.

alienmonster gravatar imagealienmonster ( 2017-11-12 23:35:53 -0600 )edit

You should update your question with more information because as is it looks like you're trying to subscribe to multiple topics from a node that you wrote. If you're trying to remap then this is a completely different situation.

jayess gravatar imagejayess ( 2017-11-12 23:42:49 -0600 )edit

Now this looks like a duplicate of another one of your questions.

jayess gravatar imagejayess ( 2017-11-12 23:43:49 -0600 )edit

Yes so how can i remap the topic /main/image_raw in an already made node /whycon node. The /main/inage_raw topic is published by node /gazebo by launching the task_1_1.launch file

alienmonster gravatar imagealienmonster ( 2017-11-12 23:53:01 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-11-13 00:48:55 -0600

matt_do gravatar image

Hi, I think, I don't understand your problem completely. You want what topic remapped to what node? In your question, you were talking about to publishers.

Generally, when you want to remappt a topic, use something like this:

rosrun <package_name> <node_name> <old_topicname>:=<new_topicname>

As I understand your question, it should be something like this:

rosrun <package_name> /whycon <old_topicname>:=/main/image_raw

But maybe I didn't understand your question right.

Best regards.

edit flag offensive delete link more
0

answered 2017-11-12 23:04:48 -0600

jayess gravatar image

Have you gone through the tutorials? These tutorials explain how to do just this. Without knowing what you've tried so far we don't know where you're at as far as your understanding of ROS goes (and we can also help you with your code to help you solve the problem).

edit flag offensive delete link more

Comments

Yes i have gone through the tutorials i have tried remapping the topic /main/image_raw to /whycon in the whycon.launch file. But it doesnt work.

alienmonster gravatar imagealienmonster ( 2017-11-12 23:38:00 -0600 )edit

What does

doesn't work

mean?

jayess gravatar imagejayess ( 2017-11-12 23:44:23 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-11-12 15:00:06 -0600

Seen: 636 times

Last updated: Nov 13 '17