In this short PR I managed to make a good use of pip and poetry.
Structure
I replaced "_" for "-" for folders name
You can now install a python dora node inside your python env by doing pip install ./node-hub/dora-node
You can link an easy path inside the graph path: dora-node instead of path: ../../../node-hub/dora-node/main.py
I deleted the package dora_lerobot and add the files inside the nodes that need those dependencies
Code
I also had time to:
change the configuration procedure, it will now create a json configuration file that will be linked inside your graph, no need to set multiple env variables (JOINTS, MODELS, INITIAL_GOAL_POSITION etc...)
Positions retrieved from dynamixel-client and feetech-client are called Physical positions in the range -4096 +4096
When working with those positions the user has to use a physical_to_logical function that takes in parameter the physical position and the conversion table (from the configuration file). Logical positions are in degrees, in the range -180, 180. This looks like that:
with open(os.environ.get("LEADER_CONTROL") as file:
leader_control = json.load(file)
leader_position = physical_to_logical(leader_position, leader_control)
See ./robots/alexk-lcr/nodes/interpolate_lcr_to_lcr.py
Apache Arrow
I decided to use Arrow format almost everywhere, but I don't know if it's good. In one hand it allows you to do that
# retrieve data from dynamixel bus
node.send_output("position", pa.array([self.bus.read_position(self.config["joints"])]), metadata)
# send data to dynamixel bus
joints = goal_position[0]["joints"].values
goal_position = goal_position[0]["values"].values
self.bus.write_goal_position(goal_position, joints)
But in another hand it's far more complicated to work on values (compared to numpy)
In this short PR I managed to make a good use of pip and poetry.
Structure
pip install ./node-hub/dora-node
path: dora-node
instead ofpath: ../../../node-hub/dora-node/main.py
dora_lerobot
and add the files inside the nodes that need those dependenciesCode
I also had time to:
change the configuration procedure, it will now create a json configuration file that will be linked inside your graph, no need to set multiple env variables (JOINTS, MODELS, INITIAL_GOAL_POSITION etc...)
Positions retrieved from
dynamixel-client
andfeetech-client
are called Physical positions in the range -4096 +4096When working with those positions the user has to use a
physical_to_logical
function that takes in parameter the physical position and the conversion table (from the configuration file). Logical positions are in degrees, in the range -180, 180. This looks like that:See
./robots/alexk-lcr/nodes/interpolate_lcr_to_lcr.py
Apache Arrow
I decided to use Arrow format almost everywhere, but I don't know if it's good. In one hand it allows you to do that
But in another hand it's far more complicated to work on values (compared to numpy)
Please tell me if you should use arrow format everywhere