Skip to content

Commit

Permalink
Using odom in montecarlo laser loc
Browse files Browse the repository at this point in the history
  • Loading branch information
javizqh committed Dec 2, 2024
1 parent f51400a commit 64244d1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from hal_interfaces.general.motors import MotorsNode
from hal_interfaces.general.odometry import OdometryNode
from hal_interfaces.general.noise_odometry import NoisyOdometryNode
from hal_interfaces.general.laser import LaserNode
from hal_interfaces.general.bumper import BumperNode

Expand All @@ -20,6 +21,7 @@
### HAL INIT ###
motor_node = MotorsNode("/cmd_vel", 4, 0.3)
odometry_node = OdometryNode("/odom")
noisy_odometry_node = NoisyOdometryNode("/odom")
laser_node = LaserNode("/roombaROS/laser/scan")
bumper_node = BumperNode(
[
Expand All @@ -32,6 +34,7 @@
# Spin nodes so that subscription callbacks load topic data
executor = rclpy.executors.MultiThreadedExecutor()
executor.add_node(odometry_node)
executor.add_node(noisy_odometry_node)
executor.add_node(laser_node)
def __auto_spin() -> None:
while rclpy.ok():
Expand All @@ -44,6 +47,9 @@ def __auto_spin() -> None:
def getPose3d():
return odometry_node.getPose3d()

def getOdom():
return noisy_odometry_node.getPose3d()

# Bumper
def getBumperData():
try:
Expand Down

0 comments on commit 64244d1

Please sign in to comment.