Skip to content

Commit

Permalink
Update wrover hostname references to wrover.local
Browse files Browse the repository at this point in the history
  • Loading branch information
co-li committed Apr 16, 2024
1 parent 1205192 commit 7fb82bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions env_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ CATKIN_SHELL=sh
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"

export ROS_MASTER_URI='http://wrover-pi.local:11311'
export ROS_MASTER/_URI='http://wrover.local:11311'
export ROS_IP=`ip addr show eth0 | grep -Po 'inet [\d.]+' | awk '{print $2}'`
export ROS_HOSTNAME='wrover-pi.local'
export ROS_HOSTNAME='wrover.local'

exec "$@"
6 changes: 3 additions & 3 deletions src/wr_entry_point/launch/comp/comp_init.launch
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<machine name="base_station" address="localhost" env-loader="/opt/ros/noetic/env.sh"
default="false" />
<!-- If running in local mode, define "wiscrobo" to also be the local machine (i.e. base station) -->
<machine name="wrover" address="wrover-pi.local"
env-loader="/home/wiscrobo/WRover_Software/env_remote.sh" user="wiscrobo"
<machine name="wrover" address="wrover.local"
env-loader="/home/wiscrobo/workspace/WRover_Software/env_remote.sh" user="wiscrobo"
default="true" unless="$(env WROVER_LOCAL)">
</machine>
<!-- env name="WROVER_LOCAL" value="false"/ -->
<!-- env name="WROVER_HW" value="MOCK"/ -->
<machine name="wrover" address="localhost" env-loader="/opt/ros/noetic/env.sh" default="true"
if="$(env WROVER_LOCAL)" />
</launch>
</launch>
6 changes: 3 additions & 3 deletions src/wr_entry_point/src/wr_entry_point/launcher_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def do_launch(launch_file: str, local_mode: bool, mock_mode: bool):
local_inet_addr: str
with SSHClient() as ssh_cli:
ssh_cli.load_system_host_keys()
ssh_cli.connect('wrover-pi.local', username='wiscrobo')
ssh_cli.connect('wrover.local', username='wiscrobo')
local_inet_addr = ssh_cli.get_transport().sock.getsockname()[0]

# retrieve rover ethernet ip address
Expand All @@ -41,7 +41,7 @@ def do_launch(launch_file: str, local_mode: bool, mock_mode: bool):
environment={
'ROS_MASTER_URI': 'http://localhost:11311',
'ROS_IP': rover_inet_addr,
'ROS_HOSTNAME': 'wrover-pi.local'
'ROS_HOSTNAME': 'wrover.local'
})
with bootstrap_stdout:
bootstrap_stdout.read()
Expand All @@ -50,7 +50,7 @@ def do_launch(launch_file: str, local_mode: bool, mock_mode: bool):
print(f'REMOTE ADDR: {rover_inet_addr}')

os.environ['WROVER_LOCAL'] = 'false'
os.environ['ROS_MASTER_URI'] = 'http://wrover-pi.local:11311'
os.environ['ROS_MASTER_URI'] = 'http://wrover.local:11311'
os.environ['ROS_IP'] = local_inet_addr

# run roslaunch
Expand Down

0 comments on commit 7fb82bd

Please sign in to comment.