Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis integration #48

Draft
wants to merge 9 commits into
base: humble
Choose a base branch
from

Conversation

ChandimaFernando
Copy link
Collaborator

This PR connects a Redis database to extract the tag ID corresponding to a given sample.

Copy link
Owner

@maffettone maffettone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! A few comments to chat over, but all in all great progress.

src/aruco_pose/README.md Outdated Show resolved Hide resolved
Comment on lines +73 to +75
HSET tag:1 id 0 family "DICT_APRILTAG_36h11" size 0.02665 sample_name sample_1
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add a python example?

Run the Redis container with the following command (make sure to have the correct binding for the local storage):
```bash
podman run --name redis-container --network host -d -v /home/wfernando1/Documents/Environments/Workspaces/redis/data/:/data -p 6379:6379 redis
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to mount a volume? If so, we should specify that this is for persistence.


# Connect to Redis
# Note: Change the host IP to map your server.
client = redis.Redis(host="192.168.56.1", port=6379, db=0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is just a tool for sanity checking, but perhaps we could do this more programmatically with:

podman container inspect -f '{{.NetworkSettings.IPAddress}}' redis-container

Comment on lines 6 to 11
import rclpy
from rclpy.action import ActionClient
from rclpy.node import Node

from pdf_beamtime_interfaces.action import FidPoseControlMsg
import redis
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import rclpy
from rclpy.action import ActionClient
from rclpy.node import Node
from pdf_beamtime_interfaces.action import FidPoseControlMsg
import redis
import rclpy
from rclpy.action import ActionClient
from rclpy.node import Node
import redis
from pdf_beamtime_interfaces.action import FidPoseControlMsg

This should fix the isort.

ChandimaFernando and others added 2 commits October 22, 2024 13:53
Co-authored-by: Dr. Phil Maffettone <43007690+maffettone@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants