Skip to content

Commit

Permalink
(F) reconfigure: Import unicore instead of uninode
Browse files Browse the repository at this point in the history
  • Loading branch information
jara001 committed Sep 8, 2023
1 parent b1f7207 commit e965280
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## Unreleased
### Fixed
- `reconfigure`
- `ROS_VERSION` and `rospy` is now properly imported from `unicore`.

## 0.9.1 - 2023-09-07
### Changed
- `uninode`:
Expand Down
10 changes: 5 additions & 5 deletions autopsy/reconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def limit_value(new_value):
######################

# ROS Python client library (inside)
import autopsy.node
import autopsy.core


# Overloading the operators
Expand All @@ -115,14 +115,14 @@ def limit_value(new_value):


# Message types
if autopsy.node.ROS_VERSION == 1:
if autopsy.core.ROS_VERSION == 1:
from dynamic_reconfigure.msg import ConfigDescription, Config, Group, ParamDescription, BoolParameter, IntParameter, StrParameter, DoubleParameter, GroupState
from dynamic_reconfigure.srv import Reconfigure

# ROS1 compiles the messages into two, in contrast to ROS2.
from dynamic_reconfigure.srv import ReconfigureResponse

if autopsy.node.ROS_VERSION == 2:
if autopsy.core.ROS_VERSION == 2:
# ROS2 uses different messages for rqt_reconfigure.
from rcl_interfaces.srv import SetParameters
from rcl_interfaces.msg import ParameterType, ParameterDescriptor, SetParametersResult, Parameter
Expand Down Expand Up @@ -644,12 +644,12 @@ def __init__(self):
def reconfigure(self, namespace = None, node = None):

if node is None:
self._node = autopsy.node.rospy
self._node = autopsy.core.rospy
else:
self._node = node

# ROS2: Use current Parameter API.
if autopsy.node.ROS_VERSION == 2:
if autopsy.core.ROS_VERSION == 2:
for p in self._parameters.values():
p._namespace = namespace

Expand Down

0 comments on commit e965280

Please sign in to comment.