Skip to content

Commit

Permalink
some unusefull stuff deleted and readme file done (hope it's ok)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoseKapps committed Nov 5, 2023
1 parent 12cfeab commit 33f564c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
22 changes: 22 additions & 0 deletions mission/internal_status/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Internal Status

This package contains a library which allows us to get current and voltage values from the Power Sense Module (PSM), and a ros node which publishes this data to the whole ROS environment.

## PSM lib

The ASV as a PSM. It takes voltage and current data going into internal electrical instruments on board. This library is a driver, which allows us to get the voltage (in V) and current (in A) values from PSM through I2C.
The I2C address is 0X69.
* Typical values for voltage: around 21V
* Typical values for current: around 0.6A


## PSM node

This ros node just publishes the current and voltage data we get from the lib to the entire ROS environment.
### Publishes to
* /asv/power_sense_module/current for the current data [A]
* /asv/power_sense_module/voltage for the voltage data [V]




Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self):
self.i2c_adress,
channel=0,
resolution=18) # current
#time.sleep(1)


# Convertion ratios taken from PSM datasheet at: https://bluerobotics.com/store/comm-control-power/control/psm-asm-r2-rp/
self.psm_to_battery_voltage = 11.0 # V/V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
self.publisher_voltage = self.create_publisher(Float32, '/asv/power_sense_module/voltage', 1)
timer_period = 0.5
self.timer = self.create_timer(timer_period, self.timer_callback)
self.i = 0


def timer_callback(self):
current = Float32()
Expand All @@ -26,7 +26,6 @@ def timer_callback(self):
self.get_logger().info('Publishing PSM current: "%s"' % current.data)
self.publisher_voltage.publish(voltage) #publish voltage value to the "voltge topic"
self.get_logger().info('Publishing PSM voltage: "%s"' % voltage.data)
self.i += 1


def main(args=None):
Expand Down

0 comments on commit 33f564c

Please sign in to comment.