Skip to content

Commit d6a0edc

Browse files
committed
modified README and linted files
1 parent e50d8ff commit d6a0edc

File tree

2 files changed

+57
-25
lines changed

2 files changed

+57
-25
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# jupyterlab-niryo-one
22

3-
Blockly extension for JupyterLab to control a Niryo One robot.
3+
Blockly extension for JupyterLab to control a Niryo robot.
44

55
## Blockly
66

@@ -9,12 +9,20 @@ Blockly is a library from Google for building beginner-friendly block-based prog
99
Docs: https://developers.google.com/blockly/guides/overview
1010
Repo: https://github.com/google/blockly
1111

12-
## Niryo One
12+
## Niryo robots
1313

14-
Niryo One, a collaborative and open source 6-axis robot made in France for: higher education, vocational training and R&D laboratories. Its use is particularly adapted to study robotics and programming in the context of the industry 4.0.
14+
The Niryo robots are collaborative and open source 6-axis robots made in France for: higher education, vocational training and R&D laboratories. Its use is particularly adapted to study robotics and programming in the context of the industry 4.0.
1515

16-
Docs: https://niryo.com/fr/product/niryo-one/
17-
Repo: https://github.com/NiryoRobotics/niryo_one_ros
16+
Docs: https://niryo.com
17+
Repo for Niryo One: https://github.com/NiryoRobotics/niryo_one_ros
18+
19+
## PyNiryo API
20+
21+
The extension is using the latest version of the `pyniryo` API - `v1.1.2`. This version is compatible with the Niryo, Ned and Ned2 robots.
22+
23+
The Niryo One and Ned robots are compatible with the `niryo` toolbox, whereas the Ned2 robot has the `ned2` toolbox. You can use all 130 blocks from each toolbox to program your robot.
24+
25+
Docs: https://docs.niryo.com/dev/pyniryo/v1.1.2/en/index.html
1826

1927
## Requirements
2028

@@ -25,9 +33,7 @@ Repo: https://github.com/NiryoRobotics/niryo_one_ros
2533
To install the extension, execute:
2634

2735
```bash
28-
micromamba create -n niryo -c conda-forge python jupyterlab==3.4 ipykernel xeus-python xeus-lua jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR
29-
micromamba activate niryo
30-
pip install jupyterlab-niryo-one
36+
conda install jupyterlab-niryo-one -c conda-forge
3137
```
3238

3339
#### Kernels

src/niryo_one_python_generators.js

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5503,14 +5503,14 @@ Blockly.Blocks['ned_open_gripper'] = {
55035503
['5/5', '1000']
55045504
]),
55055505
'OPEN_SPEED'
5506-
)
5506+
);
55075507
this.appendValueInput('MAX_TORQUE_PERCENTAGE')
55085508
.setCheck('Number')
5509-
.appendField('with max torque percentage')
5509+
.appendField('with max torque percentage');
55105510
this.appendDummyInput().appendField('%');
55115511
this.appendValueInput('HOLD_TORQUE_PERCENTAGE')
55125512
.setCheck('Number')
5513-
.appendField('and hold torque percentage');
5513+
.appendField('and hold torque percentage');
55145514
this.appendDummyInput().appendField('%');
55155515
this.setInputsInline(true);
55165516
this.setPreviousStatement(true, null);
@@ -5534,14 +5534,14 @@ Blockly.Blocks['ned_close_gripper'] = {
55345534
['5/5', '1000']
55355535
]),
55365536
'CLOSE_SPEED'
5537-
)
5537+
);
55385538
this.appendValueInput('MAX_TORQUE_PERCENTAGE')
55395539
.setCheck('Number')
5540-
.appendField('with max torque percentage')
5540+
.appendField('with max torque percentage');
55415541
this.appendDummyInput().appendField('%');
55425542
this.appendValueInput('HOLD_TORQUE_PERCENTAGE')
55435543
.setCheck('Number')
5544-
.appendField('and hold torque percentage');
5544+
.appendField('and hold torque percentage');
55455545
this.setInputsInline(true);
55465546
this.setPreviousStatement(true, null);
55475547
this.setNextStatement(true, null);
@@ -5556,36 +5556,62 @@ Blockly.Blocks['ned_close_gripper'] = {
55565556
BlocklyPy['ned_open_gripper'] = function (block) {
55575557
var number_open_speed = block.getFieldValue('OPEN_SPEED');
55585558
var value_max_torque_percentage =
5559-
BlocklyPy.valueToCode(block, 'MAX_TORQUE_PERCENTAGE', BlocklyPy.ORDER_ATOMIC) ||
5560-
'0';
5559+
BlocklyPy.valueToCode(
5560+
block,
5561+
'MAX_TORQUE_PERCENTAGE',
5562+
BlocklyPy.ORDER_ATOMIC
5563+
) || '0';
55615564
value_max_torque_percentage = value_max_torque_percentage
55625565
.replace('(', '')
55635566
.replace(')', '');
55645567
var value_hold_torque_percentage =
5565-
BlocklyPy.valueToCode(block, 'HOLD_TORQUE_PERCENTAGE', BlocklyPy.ORDER_ATOMIC) ||
5566-
'0';
5568+
BlocklyPy.valueToCode(
5569+
block,
5570+
'HOLD_TORQUE_PERCENTAGE',
5571+
BlocklyPy.ORDER_ATOMIC
5572+
) || '0';
55675573
value_hold_torque_percentage = value_hold_torque_percentage
55685574
.replace('(', '')
55695575
.replace(')', '');
5570-
var code = 'n.open_gripper( ' + number_open_speed + ', ' + value_max_torque_percentage + ', ' + value_hold_torque_percentage + ')\n';
5576+
var code =
5577+
'n.open_gripper( ' +
5578+
number_open_speed +
5579+
', ' +
5580+
value_max_torque_percentage +
5581+
', ' +
5582+
value_hold_torque_percentage +
5583+
')\n';
55715584
return code;
55725585
};
55735586

55745587
BlocklyPy['ned_close_gripper'] = function (block) {
55755588
var number_close_speed = block.getFieldValue('CLOSE_SPEED');
55765589
var value_max_torque_percentage =
5577-
BlocklyPy.valueToCode(block, 'MAX_TORQUE_PERCENTAGE', BlocklyPy.ORDER_ATOMIC) ||
5578-
'0';
5590+
BlocklyPy.valueToCode(
5591+
block,
5592+
'MAX_TORQUE_PERCENTAGE',
5593+
BlocklyPy.ORDER_ATOMIC
5594+
) || '0';
55795595
value_max_torque_percentage = value_max_torque_percentage
55805596
.replace('(', '')
55815597
.replace(')', '');
55825598
var value_hold_torque_percentage =
5583-
BlocklyPy.valueToCode(block, 'HOLD_TORQUE_PERCENTAGE', BlocklyPy.ORDER_ATOMIC) ||
5584-
'0';
5599+
BlocklyPy.valueToCode(
5600+
block,
5601+
'HOLD_TORQUE_PERCENTAGE',
5602+
BlocklyPy.ORDER_ATOMIC
5603+
) || '0';
55855604
value_hold_torque_percentage = value_hold_torque_percentage
55865605
.replace('(', '')
55875606
.replace(')', '');
5588-
var code = 'n.close_gripper(' + number_close_speed + ', ' + value_max_torque_percentage + ', ' + value_hold_torque_percentage + ')\n';
5607+
var code =
5608+
'n.close_gripper(' +
5609+
number_close_speed +
5610+
', ' +
5611+
value_max_torque_percentage +
5612+
', ' +
5613+
value_hold_torque_percentage +
5614+
')\n';
55895615
return code;
55905616
};
55915617

@@ -6530,4 +6556,4 @@ const BlocklyNed = {
65306556
};
65316557

65326558
// export default [BlocklyNiryo, BlocklyNed];
6533-
export { BlocklyNiryo, BlocklyNed };
6559+
export { BlocklyNiryo, BlocklyNed };

0 commit comments

Comments
 (0)