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

How to subscribe to published topics in Baxter SDK environment

asked 2017-03-09 01:18:51 -0600

fundamentals gravatar image

updated 2017-03-13 09:26:42 -0600

I have a c++ program that publishes three topics.

When the rostopic list command is used on the terminal it displays the list of ros topics . After running the code that publishes the topics when I run the command in the workspace normally it displays the topics I published on the terminal, but when I initialize my baxter environment using the ./baxter.sh command and run the same command it does not show the topics on the terminal.

When the rostopic echo <name of topic> command is run on the terminal it shows the value of the topic. When I run the command in the workspace normally it displays the value of which topic I chose, but when I initialize my baxter environment using the ./baxter.sh command and run the same command it does not display the values of the topics on the terminal.

I also have a python program that subscribes to the published topics the does some calculations on their values then displays the result on the terminal. When I run the program in my workspace normally it displays the the results on the terminal as it is supposed to, but when I use the ./baxter.sh command to initialize the Baxter environment just as above the code doesn't display the values.

I don't get any error messages it just does not display the published topics when I initialize my Baxter environment. I want to know why I can't see the the published topics or subscribe to them after I initialize my Baxter environment and also how to fix this problem. I am using ROS indigo on Ubuntu 14.04.

Also when I after I execute c++ program If I use command rosnode list on the terminal the name of the node is shown on the terminal but when I initialize my Baxter environment using ./baxter.sh and I try the same command the node doesn’t up on the terminal.

edit retag flag offensive close merge delete

Comments

"Do not work" and "do not show" are too vague. Please tell us exactly what it is that you're doing. Include messages that you see on the console when you start your programs and perhaps show some samples of code that you're using. Also: which version of ROS, which OS, how installed, etc.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-09 01:25:45 -0600 )edit

@gvdhoorn I tried making some edits to the question

fundamentals gravatar image fundamentals  ( 2017-03-09 02:38:59 -0600 )edit

Hello, I have a same problem with you. I'm using a python and also ubuntu 14.04. Did you solved the problem? Could you show me how do you solved it? :)

biorobotics gravatar image biorobotics  ( 2020-04-17 08:18:59 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-03-09 09:19:19 -0600

imcmahon gravatar image

It seems that you're having trouble with your ROS networking, and the associated Linux environment variables that allow bi-directional ROS communication. The ./baxter.sh script is a convenience script to help you set these viarables. Please see this tutorial from Rethink on how to set up the baxter.sh script

If you'd like a deeper dive into Baxter ROS networking, Rethink has a Networking Page that describes the ROS Naming conventions according to your networked environment. Finally, it might be useful to check out the ROS Environment variables page, looking at ROS_MASTER_URI and ROS_IP / ROS_HOSTNAME in particular.

edit flag offensive delete link more

Comments

@imcmahon I have tried the instructions in the links but none of them worked

fundamentals gravatar image fundamentals  ( 2017-03-13 05:12:39 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2017-03-09 01:18:51 -0600

Seen: 358 times

Last updated: Mar 13 '17