Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/__pycache__

COLCON_IGNORE
.colcon_root
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2024, Martin Klomp, MIRTE-team

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Binary file removed mirte_robot/__pycache__/linetrace.cpython-36.pyc
Binary file not shown.
Binary file removed mirte_robot/__pycache__/robot.cpython-36.pyc
Binary file not shown.
12 changes: 6 additions & 6 deletions mirte_robot/linetrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import multiprocessing
from websocket_server import WebsocketServer

# Already load rospy (whicht takes long) and robot, so mirte.py does not need to do this anymore
import rospy
# Already load rclpy (whicht takes long) and robot, so mirte.py does not need to do this anymore
import rclpy
from mirte_robot import robot

# Global shared memory objects (TODO: check if we need shared memory, why is server working?)
Expand All @@ -22,9 +22,9 @@
# 1) the code finishes
# 2) the user stopped the process
# 3) the websocket connection is closed
def stop_mirte(terminate = True):
def stop_mirte():
global running
if terminate:
if running.value:
process.terminate()
running.value = False

Expand Down Expand Up @@ -68,8 +68,8 @@ def traceit(frame, event, arg):

# Sending the linetrace 0 to the client
server.send_message_to_all("0")

stop_mirte(False)
running.value = False
stop_mirte()

process = multiprocessing.Process(target = load_mirte_module, args=(stepper, do_step))

Expand Down
Loading