IE-482-582 / spring2024

3 stars 0 forks source link

Problem on Project [Husky_Lasertag_Game] #46

Open Huize-Hou opened 7 months ago

Huize-Hou commented 7 months ago

Hi Dr. Murray,

When we tried to connect each other's machine, it seems that we are not able to see the topic data from guest's side.

Here is what we did: 1: "master" runs ifconfig and get ip address, then runs roscore

  1. "guest" runs export ROS_MASTER_URI="http://ipadress:11311"
  2. both run rostopic list and got the same output
    • Following the ROS wiki for running across two machines, one runs rosrun rospy_tutorials listener.py, the other runs rosrun rospy_tutorials talker.py: the listener can't get anything while talker's terminal keeps popping out "hello world".
    • "master" runs roslaunch husky_gazebo empty_world.launch, and both runs rostopic list and got the same output. When "master" tries rostopic echo /front/scan, it works fine; but when "guest" runs rostopic echo /front/scan it says "WARNING: no messages received and simulated time is active. Is /clock being pushlished?"
  3. Following Answer for solving the error above, "guest" tries rosparam set use_sim_time false, which doesn't work and returns "too many arguments"
  4. Besides that, we also followed ROS networksetup. We pinged each other, and did netcat. Both works correctly.

We don't know what's going until here. Could you please let us know how to deal with it or provide any useful link for solving this problem? We appreciate your help.

Best, Huize and Kaiwen

cmurray3 commented 7 months ago

In step 1 the master node needs to export those environment variables before running roscore.

Each time either of you open a terminal window, make sure to export those same environment variables before running any commands in that terminal.

-chase murray

On Apr 6, 2024, at 3:12 PM, hh @.***> wrote:



Hi Dr. Murray,

When we tried to connect each other's machine, it seems that we are not able to see the topic data from guest's side.

Here is what we did: 1: "master" runs ifconfig and get ip address, then runs roscore

  1. "guest" runs export ROS_MASTER_URI="http://ipadress:11311"
  2. both run rostopic list and got the same output
    • Following the ROS wiki for running across two machineshttp://wiki.ros.org/ROS/Tutorials/MultipleMachines, one runs rosrun rospy_tutorials listener.py, the other runs rosrun rospy_tutorials talker.py: the listener can't get anything while talker's terminal keeps popping out "hello world".
    • "master" runs roslaunch husky_gazebo empty_world.launch, and both runs rostopic list and got the same output. When "master" tries rostopic echo /front/scan, it works fine; but when "guest" runs rostopic echo /front/scan it says "WARNING: no messages received and simulated time is active. Is /clock being pushlished?"
    1. Following Answer for solving the error abovehttps://answers.ros.org/question/12083/messages-being-blocked-from-publishing/, "guest" tries rosparam set use_sim_time false, which doesn't work and returns "too many arguments"
    2. Besides that, we also followed ROS networksetuphttp://wiki.ros.org/ROS/NetworkSetup. We pinged each other, and did netcat. Both works correctly.

We don't know what's going until here. Could you please let us know how to deal with it or provide any useful link for solving this problem? We appreciate your help.

Best, Huize and Kaiwen

— Reply to this email directly, view it on GitHubhttps://github.com/IE-482-582/spring2024/issues/46, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AENBMDCAOXLRBYGNR7MCDELY4BCITAVCNFSM6AAAAABF2U66ZWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZDSMZWHE4TSOI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Huize-Hou commented 7 months ago

In step 1 the master node needs to export those environment variables before running roscore. Each time either of you open a terminal window, make sure to export those same environment variables before running any commands in that terminal. -chase murray On Apr 6, 2024, at 3:12 PM, hh @.> wrote:  Hi Dr. Murray, When we tried to connect each other's machine, it seems that we are not able to see the topic data from guest's side. Here is what we did: 1: "master" runs ifconfig and get ip address, then runs roscore 2. "guest" runs export ROS_MASTER_URI="http://ipadress:11311" 3. both run rostopic list and got the same output 4. Following the ROS wiki for running across two machineshttp://wiki.ros.org/ROS/Tutorials/MultipleMachines, one runs rosrun rospy_tutorials listener.py, the other runs rosrun rospy_tutorials talker.py: the listener can't get anything while talker's terminal keeps popping out "hello world". "master" runs roslaunch husky_gazebo empty_world.launch, and both runs rostopic list and got the same output. When "master" tries rostopic echo /front/scan, it works fine; but when "guest" runs rostopic echo /front/scan it says "WARNING: no messages received and simulated time is active. Is /clock being pushlished?" 1. Following Answer for solving the error abovehttps://answers.ros.org/question/12083/messages-being-blocked-from-publishing/, "guest" tries rosparam set use_sim_time false, which doesn't work and returns "too many arguments" 2. Besides that, we also followed ROS networksetuphttp://wiki.ros.org/ROS/NetworkSetup. We pinged each other, and did netcat. Both works correctly. We don't know what's going until here. Could you please let us know how to deal with it or provide any useful link for solving this problem? We appreciate your help. Best, Huize and Kaiwen — Reply to this email directly, view it on GitHub<#46>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AENBMDCAOXLRBYGNR7MCDELY4BCITAVCNFSM6AAAAABF2U66ZWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZDSMZWHE4TSOI. You are receiving this because you are subscribed to this thread.Message ID: @.>

We tried to run export ROS_MASTER_URI="http://ipadress:11311" on both machines, then we also checked environment variables by pico .bashrc for having same environment variables. The error in step 5 is fixed but the "guest" still couldn't receive anything by rostopic echo /front/scan, there is only blank.

cmurray3 commented 7 months ago

On the master

  1. use ifconfig to find the IP address of the master.
  2. Run the following 2 commands, replacing all the x's with the actual IP address you found in Step 1:
    export ROS_MASTER_URI=http://xxx.xxx.xxx.xxx:11311
    export ROS_HOSTNAME=xxx.xxx.xxx.xxx

    The master computer must export both of these environment variables in each terminal window, before you run any other ROS-related commands. You may wish to put these in your ~/.bashrc.

    • If you store the environment variables in ~/.bashrc, make sure to source ~/.bashrc in any open terminals.

On each client

export ROS_MASTER_URI=http://xxx.xxx.xxx.xxx:11311
export ROS_HOSTNAME=yyyyyy    
Huize-Hou commented 7 months ago

On the master

  1. use ifconfig to find the IP address of the master.
  2. Run the following 2 commands, replacing all the x's with the actual IP address you found in Step 1:
    export ROS_MASTER_URI=http://xxx.xxx.xxx.xxx:11311
    export ROS_HOSTNAME=xxx.xxx.xxx.xxx

The master computer must export both of these environment variables in each terminal window, before you run any other ROS-related commands. You may wish to put these in your ~/.bashrc.

  • If you store the environment variables in ~/.bashrc, make sure to source ~/.bashrc in any open terminals.

On each client

export ROS_MASTER_URI=http://xxx.xxx.xxx.xxx:11311
export ROS_HOSTNAME=yyyyyy    
  • The first line (involving ROS_MASTER_URI) should be exactly what was written for the master.
  • The second line (involving ROS_HOSTNAME), is optional for the client. If you use it, replace yyyyyy with your name, or your IP address, or some other text string unique to your computer. Just make sure that this one is NOT the same as the ROS_HOSTNAME used by the master computer.

Got it work. Thank you professor.