-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: humble
Are you sure you want to change the base?
Redis integration #48
Conversation
There was a problem hiding this 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.
HSET tag:1 id 0 family "DICT_APRILTAG_36h11" size 0.02665 sample_name sample_1 | ||
``` |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
import rclpy | ||
from rclpy.action import ActionClient | ||
from rclpy.node import Node | ||
|
||
from pdf_beamtime_interfaces.action import FidPoseControlMsg | ||
import redis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Co-authored-by: Dr. Phil Maffettone <43007690+maffettone@users.noreply.github.com>
This PR connects a Redis database to extract the tag ID corresponding to a given sample.