Skip to content

Commit

Permalink
Removed token as of api 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dniewinski committed Sep 23, 2020
1 parent 7bd68b9 commit 231ffb3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions spot_driver/launch/driver.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<launch>
<arg name="username" default="dummyusername" />
<arg name="password" default="dummypassword" />
<arg name="app_token" default="/home/spot/.bosdyn/dev.app_token" />
<arg name="hostname" default="192.168.50.3" />

<include file="$(find spot_description)/launch/description.launch" />
Expand All @@ -11,7 +10,6 @@
<rosparam file="$(find spot_driver)/config/spot_ros.yaml" command="load" />
<param name="username" value="$(arg username)" />
<param name="password" value="$(arg password)" />
<param name="app_token" value="$(arg app_token)" />
<param name="hostname" value="$(arg hostname)" />
<remap from="joint_states" to="/joint_states"/>
<remap from="tf" to="/tf"/>
Expand Down
3 changes: 1 addition & 2 deletions spot_driver/scripts/spot_ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,13 @@ def main(self):
self.rates = rospy.get_param('~rates', {})
self.username = rospy.get_param('~username', 'default_value')
self.password = rospy.get_param('~password', 'default_value')
self.app_token = rospy.get_param('~app_token', 'default_value')
self.hostname = rospy.get_param('~hostname', 'default_value')
self.motion_deadzone = rospy.get_param('~deadzone', 0.05)

self.logger = logging.getLogger('rosout')

rospy.loginfo("Starting ROS driver for Spot")
self.spot_wrapper = SpotWrapper(self.username, self.password, self.app_token, self.hostname, self.logger, self.rates, self.callbacks)
self.spot_wrapper = SpotWrapper(self.username, self.password, self.hostname, self.logger, self.rates, self.callbacks)

if self.spot_wrapper.is_valid:
# Images #
Expand Down
10 changes: 1 addition & 9 deletions spot_driver/scripts/spot_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,9 @@ def _start_query(self):

class SpotWrapper():
"""Generic wrapper class to encompass release 1.1.4 API features as well as maintaining leases automatically"""
def __init__(self, username, password, token, hostname, logger, rates = {}, callbacks = {}):
def __init__(self, username, password, hostname, logger, rates = {}, callbacks = {}):
self._username = username
self._password = password
self._token = token
self._hostname = hostname
self._logger = logger
self._rates = rates
Expand Down Expand Up @@ -210,12 +209,6 @@ def __init__(self, username, password, token, hostname, logger, rates = {}, call
self._logger.error("Error creating SDK object: %s", e)
self._valid = False
return
try:
self._sdk.load_app_token(self._token)
except Exception as e:
self._logger.error("Error loading developer token: %s", e)
self._valid = False
return

self._robot = self._sdk.create_robot(self._hostname)

Expand Down Expand Up @@ -482,4 +475,3 @@ def velocity_cmd(self, v_x, v_y, v_rot, cmd_duration=0.1):
v_x=v_x, v_y=v_y, v_rot=v_rot, params=self._mobility_params),
end_time_secs=end_time)
self._last_motion_command_time = end_time

0 comments on commit 231ffb3

Please sign in to comment.