You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Rename mr_desc_param.py script to mr_desc_param
* Add command line args to mr_desc_param
* Tool now takes a dict instead of kwargs
* Changed Tool arg robot_namespace to namespace
* Changed License holder
* Improved README with more detailed usage info
* Add requirements.txt file
* Added ROS_PYTHON_VERSION conditionals to package dependencies
* Change required version of scipy
This package contains a simple Python program that calculates some properties required to run parts of the [Modern Robotics Library](https://github.com/NxRLab/ModernRobotics) from a robot's URDF or robot_description parameter. Specifically, this program calculates the M and Slist parameters required by the MR inverse kinematics functions:
5
+
This package contains a simple Python program that calculates some properties required to run parts of the [Modern Robotics Library](https://github.com/NxRLab/ModernRobotics) from a robot's URDF or robot_description parameter. Specifically, this program calculates the M and Slist parameters required by MR kinematics functions:
6
6
7
-
- The **M** matrix is the position and orientation of the end effector frame when the robot is in its home position (i.e. all joints are at position 0).
8
-
- The **Slist** matrix is the joint screw axes in the end effector frame when the robot is in its home position. This matrix is formatted to have each axis as a column.
7
+
- The **M** matrix is the end effector configuration in SE(3) when the robot is in its home position (i.e. all joints are at position 0).
8
+
- The **Slist** matrix is the joint screw axes expressed in the space frame when the robot is in its home position. This matrix is formatted to have each axis as a column.
9
+
10
+
Note that this package is only compatible with ROS Noetic and Python3. However, it can be used other ROS distributions by installing using the requirements.txt and using the Importing method described below.
9
11
10
12
## Dependencies
11
13
12
14
The dependencies of this software package are:
13
15
14
16
- urdf_parser_py
15
17
- numpy
16
-
- scipy
18
+
- scipy>=1.2.0 (for the scipy.spatial.transform module)
17
19
- pyyaml
18
20
19
-
You can use rosdep or the setup file to install the required dependencies.
20
-
21
-
Note that this package is only compatible with ROS Noetic and Python3.
21
+
You can use rosdep (only on Noetic), the requirements.txt file, or the setup.py script to install the required dependencies.
22
22
23
23
## Usage
24
24
25
25
You must specify three parameters before using this library:
26
26
27
-
-**namespace** - The namespace of the robot_description parameter and the namespace that each link will be listed under in the URDF. For example, if the robot is named "vx300s", a link may be listed like "vx300s/shoulder_link". If no namespace is used, leave this as an empty string, i.e. `''`.
27
+
-**namespace** - The namespace of the robot_description parameter and the namespace that each link will be listed under in the URDF. For example, if the robot is named `vx300s`, a link may be named something like `vx300s/shoulder_link`. If no namespace is used, leave this as an empty string, i.e. `''`.
28
28
-**space_frame** - The name given to the link that will serve as the location of the robot's base, or {0} link.
29
29
-**body_frame** - The name given to the link that will serve as the location of the end effector.
30
30
31
31
There are two primary ways to use this library: importing the module, and using rosrun.
32
32
33
33
### Importing
34
34
35
-
The KinematicsFromDescription Tool can be imported into your Python3 script.
35
+
The KinematicsFromDescription Tool can be imported into your Python script. The Tool accepts a single positional argument - a dictionary with the keys `space_frame`, `body_frame`, and `namespace`. See the [config file](config/config.yaml) for details.
36
36
37
37
```python
38
38
from kinematics_from_description.kfd import KinematicsFromDescriptionTool asKFD
39
39
40
40
...
41
41
42
42
tool = KFD(
43
-
space_frame="space_frame",
44
-
body_frame="body_frame",
45
-
robot_namespace="namespace")
43
+
{
44
+
space_frame: "space_frame",
45
+
body_frame: "body_frame",
46
+
namespace: "namespace"
47
+
}
46
48
tool.load_desc_from_file(filepath)
47
49
tool.run()
48
50
```
49
51
50
52
### Using rosrun
51
53
52
-
Since this package is catkin-ized, it can be launched using ROS.
54
+
Since this package is catkin-ized, it can be launched using ROS.
53
55
54
-
1. Modify the [config.yaml](./config/config.yaml) file to match your description setup.
55
-
2. Launch your robot's robot_description package to load the robot_description parameter into ROS' parameter server.
56
-
3. Run the [mr_desc_param.py](./scripts/mr_desc_param.py) script using rosrun.
56
+
#### Using a configuration file:
57
+
- Modify the [config.yaml](./config/config.yaml) file to match your description setup.
58
+
- Launch your robot's robot_description package to load the robot_description parameter into ROS' parameter server.
59
+
- Run the [mr_desc_param](./scripts/mr_desc_param) script using rosrun, specifying the location of the config file.
<description>This package contains a simple Python program that calculates properties required to run parts of the <ahref="https://github.com/NxRLab/ModernRobotics">Modern Robotics Library</a> from a robot's robot_description parameter.</description>
0 commit comments