Skip to content

Commit 0bb63bf

Browse files
authored
Merge pull request #3132 from JdeRobot/neutral-steps-ram
Change visualization and config to tools
2 parents 1202859 + 6f36fcf commit 0bb63bf

File tree

89 files changed

+1048
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+1048
-471
lines changed

RoboticsInfrastructure

common/gui_interfaces/gui_interfaces/general/measuring_threading_gui.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class MeasuringThreadingGUI:
2222

2323
def __init__(self, host="ws://127.0.0.1:2303", freq=30.0):
2424

25-
# ROS 2 init
26-
if not rclpy.ok():
27-
rclpy.init()
28-
2925
# Execution control vars
3026
self.out_period = 1.0 / freq
3127

@@ -49,7 +45,6 @@ def __init__(self, host="ws://127.0.0.1:2303", freq=30.0):
4945
self.running = True
5046

5147
self.host = host
52-
self.node = rclpy.create_node("node")
5348

5449
def start(self):
5550
# Initialize and start the WebSocket client thread

common/gui_interfaces/gui_interfaces/general/measuring_threading_gui_harmonic.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ class MeasuringThreadingGUI:
2525

2626
def __init__(self, host="ws://127.0.0.1:2303", freq=30.0, world_name="default"):
2727

28-
# ROS 2 init
29-
if not rclpy.ok():
30-
rclpy.init()
31-
3228
# Execution control vars
3329
self.out_period = 1.0 / freq
3430

@@ -52,7 +48,6 @@ def __init__(self, host="ws://127.0.0.1:2303", freq=30.0, world_name="default"):
5248
self.running = True
5349

5450
self.host = host
55-
self.node = rclpy.create_node("node")
5651

5752
self.world_name = world_name
5853

common/gui_interfaces/gui_interfaces/general/measuring_threading_gui_no_sim.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class MeasuringThreadingGUI:
2222

2323
def __init__(self, host="ws://127.0.0.1:2303", freq=30.0):
2424

25-
# ROS 2 init
26-
if not rclpy.ok():
27-
rclpy.init()
28-
2925
# Execution control vars
3026
self.out_period = 1.0 / freq
3127

@@ -49,7 +45,6 @@ def __init__(self, host="ws://127.0.0.1:2303", freq=30.0):
4945
self.running = True
5046

5147
self.host = host
52-
self.node = rclpy.create_node("node")
5348

5449
def start(self):
5550
# Initialize and start the WebSocket client thread

common/hal_interfaces/hal_interfaces/general/bumper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from rclpy.node import Node
22
from gazebo_msgs.msg import ContactsState
3+
import rclpy
4+
5+
if not rclpy.ok():
6+
rclpy.init()
37

48
### AUXILIARY FUNCTIONS ###
59

common/hal_interfaces/hal_interfaces/general/camera.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
import numpy as np
55
import cv_bridge
66
import cv2
7+
import rclpy
8+
9+
if not rclpy.ok():
10+
rclpy.init()
711

812
### AUXILIARY FUNCTIONS ###
913

common/hal_interfaces/hal_interfaces/general/laser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
from rclpy.node import Node
22
import sensor_msgs.msg
33
from math import pi as PI
4+
import rclpy
5+
6+
if not rclpy.ok():
7+
rclpy.init()
48

59

610
### AUXILIARY FUNCTIONS

common/hal_interfaces/hal_interfaces/general/motors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from geometry_msgs.msg import Twist
22
from rclpy.node import Node
3+
import rclpy
4+
5+
if not rclpy.ok():
6+
rclpy.init()
37

48

59
### HAL INTERFACE ###

common/hal_interfaces/hal_interfaces/general/noise_odometry.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
from rclpy.node import Node
33
from math import asin, atan2, pi
44
import nav_msgs.msg
5+
import rclpy
6+
7+
if not rclpy.ok():
8+
rclpy.init()
59

610

711
### AUXILIARY FUNCTIONS ###

common/hal_interfaces/hal_interfaces/general/odometry.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
from rclpy.node import Node
22
from math import asin, atan2, pi
33
import nav_msgs.msg
4+
import rclpy
5+
6+
if not rclpy.ok():
7+
rclpy.init()
48

59

610
### AUXILIARY FUNCTIONS ###

0 commit comments

Comments
 (0)