Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
neuenfeldttj committed Apr 5, 2024
1 parent 327c26b commit 784d380
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 2 additions & 0 deletions scripts/moteusConfigManage.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@

MOTEUS_SAVE_DIR = str(Path.cwd()) + "/config/moteus/" # Need to change this for other laptops.


def list_cfgs():
files = os.listdir(MOTEUS_SAVE_DIR)
print("Saved configs:\n\t")
print(*files, sep="\n\t")


def main():
command: str
if len(sys.argv) >= 2:
Expand Down
18 changes: 6 additions & 12 deletions src/teleoperation/backend/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Spectral,
ScienceThermistors,
HeaterData,
NetworkBandwidth
NetworkBandwidth,
)
from mrover.srv import EnableAuton, AdjustMotor, ChangeCameras, CapturePanorama
from sensor_msgs.msg import NavSatFix, Temperature, RelativeHumidity, Image
Expand Down Expand Up @@ -119,7 +119,9 @@ def connect(self):
)
self.science_spectral = rospy.Subscriber("/science_spectral", Spectral, self.science_spectral_callback)
self.cmd_vel = rospy.Subscriber("/cmd_vel", Twist, self.cmd_vel_callback)
self.network_bandwidth = rospy.Subscriber("/network_bandwidth", NetworkBandwidth, self.network_bandwidth_callback)
self.network_bandwidth = rospy.Subscriber(
"/network_bandwidth", NetworkBandwidth, self.network_bandwidth_callback
)

# Services
self.laser_service = rospy.ServiceProxy("enable_arm_laser", SetBool)
Expand Down Expand Up @@ -606,18 +608,10 @@ def drive_status_callback(self, msg):
)

def cmd_vel_callback(self, msg):
self.send(
text_data=json.dumps(
{"type": "cmd_vel", "linear_x": msg.linear.x, "angular_z": msg.angular.z}
)
)
self.send(text_data=json.dumps({"type": "cmd_vel", "linear_x": msg.linear.x, "angular_z": msg.angular.z}))

def network_bandwidth_callback(self, msg):
self.send(
text_data=json.dumps(
{"type": "network_bandwidth", "tx": msg.tx, "rx": msg.rx}
)
)
self.send(text_data=json.dumps({"type": "network_bandwidth", "tx": msg.tx, "rx": msg.rx}))

def gps_fix_callback(self, msg):
self.send(
Expand Down

0 comments on commit 784d380

Please sign in to comment.