osgar.drivers package¶
Submodules¶
osgar.drivers.canserial module¶
Wrapper for CAN-serial communication and control of CAN bridge
-
class
osgar.drivers.canserial.
CANSerial
(config, bus)¶ Bases:
threading.Thread
-
check_and_restart_module
(module_id, status)¶
-
process_gen
(data)¶
-
process_packet
(packet)¶
-
read_packet
()¶
-
request_stop
()¶
-
reset_all_modules
()¶ Reset all modules: - broadcast “reset node” - make sure every node reaches pre-operational state - switch all nodes to operational state
return: list of operational modules
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
send_data
(module_id, data)¶
-
static
split_buffer
(data)¶
-
-
osgar.drivers.canserial.
CAN_packet
(msg_id, data)¶
-
osgar.drivers.canserial.
get_node_id
(msg_id)¶
-
osgar.drivers.canserial.
is_nmt_message
(msg_id)¶
-
osgar.drivers.canserial.
parse_header
(data)¶
-
osgar.drivers.canserial.
print_packet
(data, dbc={})¶
osgar.drivers.eduro module¶
Driver for robot Eduro
-
class
osgar.drivers.eduro.
Eduro
(config, bus)¶ Bases:
threading.Thread
-
check_restarted_modules
(module_id, status)¶
-
process_gen
(data, verbose=False)¶
-
process_packet
(packet, verbose=False)¶
-
request_stop
()¶
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
send_leds
(blue, red)¶
-
send_speed
()¶
-
send_speed_ref
()¶
-
update_emergency_stop
(data)¶
-
update_encoders
(msg_id, data)¶
-
update_pose
()¶
-
-
osgar.drivers.eduro.
sint32_diff
(a, b)¶
osgar.drivers.gps module¶
GPS Driver
-
class
osgar.drivers.gps.
GPS
(config, bus)¶ Bases:
threading.Thread
-
process_gen
(data)¶
-
process_packet
(line)¶
-
request_stop
()¶
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
-
osgar.drivers.gps.
checksum
(s)¶
-
osgar.drivers.gps.
parse_bin
(data)¶
-
osgar.drivers.gps.
parse_line
(line)¶
-
osgar.drivers.gps.
print_output
(packet)¶
-
osgar.drivers.gps.
split_buffer
(data)¶
-
osgar.drivers.gps.
str2ms
(s)¶ convert DDMM.MMMMMM string to arc milliseconds(int)
osgar.drivers.imu module¶
Simple IMU data analysis
-
class
osgar.drivers.imu.
IMU
(config, bus)¶ Bases:
threading.Thread
-
process_gen
(data)¶
-
process_packet
(line)¶
-
request_stop
()¶
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
static
split_buffer
(data)¶
-
-
osgar.drivers.imu.
parse_line
(line)¶
osgar.drivers.logserial module¶
Wrapper & timestamper of input serial byte stream
osgar.drivers.logsocket module¶
Wrapper & timestamper of input/out over socket
-
class
osgar.drivers.logsocket.
LogHTTP
(config, bus)¶ Bases:
object
-
join
(timeout=None)¶
-
request_stop
()¶
-
run_input
()¶
-
start
()¶
-
-
class
osgar.drivers.logsocket.
LogSocket
(socket, config, bus)¶ Bases:
object
-
join
(timeout=None)¶
-
request_stop
()¶
-
run_input
()¶
-
run_output
()¶
-
start
()¶
-
-
class
osgar.drivers.logsocket.
LogTCP
(config, bus)¶
-
class
osgar.drivers.logsocket.
LogUDP
(config, bus)¶
osgar.drivers.sicklidar module¶
SICK Tim571 LIDAR Driver
-
class
osgar.drivers.sicklidar.
SICKLidar
(config, bus)¶ Bases:
threading.Thread
-
static
parse_raw_data
(raw_data)¶
-
process_gen
(data)¶
-
process_packet
(packet)¶
-
request_stop
()¶
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
split_buffer
(data)¶
-
static
osgar.drivers.simulator module¶
Simple Spider Simulator
-
class
osgar.drivers.simulator.
SpiderSimulator
(config, bus)¶ Bases:
threading.Thread
-
get_position
()¶ combine pose with ref GPS position
-
get_wheels_angles_raw
()¶
-
request_stop
()¶
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
step
(dt)¶
-
osgar.drivers.spider module¶
Spider3 Rider Driver
-
osgar.drivers.spider.
CAN_packet
(msg_id, data)¶
-
class
osgar.drivers.spider.
Spider
(config, bus)¶ Bases:
threading.Thread
-
static
fix_range
(value)¶ into <-256, +256) interval
-
process_gen
(data, verbose=False)¶
-
process_packet
(packet, verbose=False)¶
-
request_stop
()¶
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
send
(data)¶
-
static
split_buffer
(data)¶
-
static
osgar.drivers.test_canserial module¶
osgar.drivers.test_eduro module¶
osgar.drivers.test_gps module¶
-
class
osgar.drivers.test_gps.
GPSTest
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
test_checksum
()¶
-
test_invalid_coordinates
()¶
-
test_parse_line
()¶
-
test_parse_position_velocity_time_solution
()¶
-
test_parse_rel_position
()¶
-
test_parse_velocity_and_heading
()¶
-
test_parsing_old_GPGGA
()¶
-
test_split
()¶
-
test_split_with_binary_data
()¶
-
test_str2ms
()¶
-