Skip to content

Commit 9672e87

Browse files
committed
First Commit
0 parents  commit 9672e87

File tree

125 files changed

+956
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+956
-0
lines changed

+helpers/createRBT.m

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function p = createRBT()
2+
% Copyright 2024-2025 The MathWorks, Inc.
3+
workingDir = fullfile(pwd,"ned_ros","niryo_robot_description");
4+
xacro = dir(fullfile(workingDir,'urdf','*\*.xacro'));
5+
pattern = '<xacro:include filename="([^"]*\/)[^\/]+\.xacro"\/>';
6+
for f = 1:numel(xacro)
7+
text = fileread(fullfile(xacro(f).folder,xacro(f).name));
8+
[a,b] = regexp(text,pattern,'match','tokens');
9+
10+
for i = 1:numel(a)
11+
text = replace(text,b{i},'');
12+
end
13+
writelines(text,fullfile(fileparts(xacro(1).folder),xacro(f).name))
14+
15+
end
16+
p = fullfile(fileparts(xacro(1).folder));

+helpers/startupProject.m

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if ~isfolder('ned_ros')
2+
open("FirstSetup.mlx");
3+
end

.gitattributes

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
* text=auto
2+
3+
*.fig binary
4+
*.mat binary
5+
*.mdl binary diff merge=mlAutoMerge
6+
*.mdlp binary
7+
*.mex* binary
8+
*.mlapp binary
9+
*.mldatx binary
10+
*.mlproj binary
11+
*.mlx binary
12+
*.p binary
13+
*.sfx binary
14+
*.sldd binary
15+
*.slreqx binary merge=mlAutoMerge
16+
*.slmx binary merge=mlAutoMerge
17+
*.sltx binary
18+
*.slxc binary
19+
*.slx binary merge=mlAutoMerge
20+
*.slxp binary
21+
22+
## Other common binary file types
23+
*.docx binary
24+
*.exe binary
25+
*.jpg binary
26+
*.pdf binary
27+
*.png binary
28+
*.xlsx binary

.gitignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Autosave files
2+
*.asv
3+
*.m~
4+
*.autosave
5+
*.slx.r*
6+
*.mdl.r*
7+
8+
# Derived content-obscured files
9+
*.p
10+
11+
# Compiled MEX files
12+
*.mex*
13+
14+
# Packaged app and toolbox files
15+
*.mlappinstall
16+
*.mltbx
17+
18+
# Deployable archives
19+
*.ctf
20+
21+
# Generated helpsearch folders
22+
helpsearch*/
23+
24+
# Code generation folders
25+
slprj/
26+
sccprj/
27+
codegen/
28+
29+
# Cache files
30+
*.slxc
31+
32+
# Cloud based storage dotfile
33+
.MATLABDriveTag
34+
35+
# buildtool cache folder
36+
.buildtool/
37+

CONTRIBUTING.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributing
2+
3+
>_If you believe you have discovered a security vulnerability, please **do not** open an issue or make a pull request. Follow the instructions in the [SECURITY.MD](SECURITY.MD) file in this repository._
4+
5+
Thank you for your interest in contributing to a MathWorks repository! We encourage contributions large and small to this repository.
6+
7+
**We only accept examples as contribution.** If you see a way to explain things more clearly or a great example of how to use something, please contribute it (or a link to your content). We welcome ideas of creating a great example even if you don't code the solution.
8+
9+
## How to contribute
10+
11+
* **Open an issue:** Start by [creating an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue) for the example that you're interested in contributing. That will start a conversation with the maintainer. Please include as many details as possible. Please remember that other people do not have your background or understanding; make sure you are clear and complete in your description.
12+
* **Work in your own public fork:** If you choose to make a contribution, you should [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo). This creates an editable copy on GitHub where you can write, test, and refine your changes. We suggest that you keep your changes small and focused on the issue you submitted.
13+
* **Sign a Contributor License Agreement (CLA):** We require that all outside contributors sign a [CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement) before we can accept your contribution. When you create a pull request (see below), we'll reach out to you if you do not already have one on file. Essentially, the CLA gives us permission to publish your contribution as part of the repository.
14+
* **Make a pull request:** "[Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)" is a confusing term, but it means exactly what it says: You're requesting that the maintainers of the repository pull your changes in. If you don't have a CLA on file, we'll reach out to you. Your contribution will be reviewed, and we may ask you to revise your pull request based on our feedback. Once everyone is satisfied, we'll merge your pull request into the repository.
15+
16+
## Guidelines
17+
18+
We don't have best practices for writing MATLAB&reg; code, but we do have some recommendations:
19+
20+
* You should not have any warnings or errors in the [code analyzer report](http://www.mathworks.com/help/matlab/matlab_prog/matlab-code-analyzer-report.html)
21+
* [Loren Shure's blog](https://blogs.mathworks.com/loren) has [great advice on improving your MATLAB code](https://blogs.mathworks.com/loren/category/best-practice/)
22+
* Examples should be written as [live scripts](https://www.mathworks.com/help/matlab/matlab_prog/what-is-a-live-script-or-function.html) and then [exported as HTML](https://www.mathworks.com/help/matlab/matlab_prog/share-live-scripts.html).
23+
* We adhere to the [CommonMark](https://commonmark.org/) specification where it does not conflict with GitHub rendering. If you edit your Markdown in Visual Studio Code or a similar editor, it uses [markdownlint](https://github.com/DavidAnson/markdownlint) to highlight issues in your Markdown.
24+
25+
**Again, thanks for contributing, and we look forward to your issues and pull requests!**

FirstSetup.mlx

7.58 KB
Binary file not shown.

Ned2_Hardware.mlx

72.4 KB
Binary file not shown.

Ned2_Simulation.mlx

4.88 KB
Binary file not shown.

Niryo_Ned2.prj

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<MATLABProject xmlns="http://www.mathworks.com/MATLABProjectFile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"/>

README.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
2+
# <span style="color:rgb(213,80,0)">MATLAB Support for Niryo Ned2 Robots</span>
3+
4+
With the Robotics System Toolbox and ROS Toolbox, you can easily connect to and control Niryo Ned2 Robots, leveraging MATLAB's advanced capabilities in robotics and automation.
5+
6+
This repository requires [MATLAB](https://www.mathworks.com/products/matlab.html)® R2024b or later, [Robotics System Toolbox](https://www.mathworks.com/products/robotics.html) and [ROS Toolbox](https://www.mathworks.com/products/ros.html).
7+
8+
## Why Use Niryo Ned2 Robots with MATLAB?
9+
- **Interactive Learning:** Experiment with real\-world robotics applications, bridging the gap between theory and practice. Simulate, control, and visualize robot operations all in one place.
10+
- **Project\-based exploration:** Create projects that challenge creativity and problem\-solving skills, from basic control tasks to advanced AI\-driven robotics.
11+
- **Comprehensive Curriculum:** Leverage MathWorks' extensive educational resources to design courses that cover fundamental to advanced robotics concepts. Use real\-time data and simulations to make abstract concepts tangible.
12+
# Getting started
13+
14+
To get started, install and look at *FirstSetup.mlx* for more information on using the toolbox.
15+
16+
| **File** <br> | **Description** <br> |
17+
| :-- | :-- |
18+
| Ned2\_Simulation.mlx <br> | Control a simulated model of Niryo Ned2. <br> |
19+
| | <img src="README_media/image_0.gif" width="628" alt="image_0.gif"> <br> |
20+
| Ned2\_Hardware.mlx <br> | Control a real Niryo Ned2 robot (requires ROS Toolbox) <br> |
21+
| | <img src="README_media/image_1.gif" width="627" alt="image_1.gif"> <br> |
22+
23+
24+
## Core Functions
25+
| **Function** <br> | **Description** <br> |
26+
| :-- | :-- |
27+
| SetPose() <br> | Control robot joint angles. <br> |
28+
| PlanTrajectory() <br> | Plan a trajectory that follows multiple waypoints <br> |
29+
| Move() <br> | Use Inverse Kinematics to find a joint configuration for a given XYZ position <br> |
30+
31+
## Features to Explore
32+
- [**Stateflow**](https://www.mathworks.com/help/stateflow/getting-started.html): Develop complex logic and state machines for advanced control systems, making your robot smarter and more autonomous.
33+
- [**Motion and Path Planning**](https://www.mathworks.com/help/robotics/motion-and-path-planning.html): Experiment with different path planning algorithms to optimize robot movements with collision avoidance, enhancing efficiency and performance.
34+
- [**Image Processing**](https://www.mathworks.com/help/images/index.html) **and** [**Computer Vision**](https://www.mathworks.com/help/vision/recognition-object-detection-and-semantic-segmentation.html): Integrate sensors and use MATLAB's image processing capabilities to add perception to your robot, enabling it to interact with its environment intelligently.
35+
36+
# Related Courseware Modules
37+
###
38+
<div style="display: flex">
39+
<table>
40+
<tr>
41+
<td colspan="2" style="text-align:center;">
42+
<a href="https://www.mathworks.com/matlabcentral/fileexchange/130124-robotic-manipulators">Robotic Manipulators</a>
43+
</td>
44+
<td colspan="2" style="text-align:center;">
45+
<a href="https://www.mathworks.com/matlabcentral/fileexchange/136364-applied-linear-algebra">Applied Linear Algebra: Robotics</a>
46+
</td>
47+
</tr>
48+
<tr>
49+
<td style="text-align:center;">
50+
<img src="README_media/image_2.png" width="146" alt="image_2.png"><br>
51+
</td>
52+
<td>
53+
Available on:<br>
54+
<a href="https://github.com/MathWorks-Teaching-Resources/Robotic-Manipulators">
55+
<img src="README_media/image_3.png" width="81" alt="image_3.png">
56+
</a><br>
57+
<a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Robotic-Manipulators&project=RoboticManipulators.prj">
58+
<img src="README_media/image_4.png" width="131" alt="image_4.png">
59+
</a><br>
60+
<a href="https://github.com/MathWorks-Teaching-Resources/Robotic-Manipulators">GitHub</a><br>
61+
</td>
62+
<td style="text-align:center;">
63+
<img src="README_media/image_5.png" width="147" alt="image_5.png"><br>
64+
</td>
65+
<td>
66+
Available on:<br>
67+
<a href="https://www.mathworks.com/matlabcentral/fileexchange/136364-applied-linear-algebra">
68+
<img src="README_media/image_6.png" width="81" alt="image_6.png">
69+
</a><br>
70+
<a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-Linear-Algebra&project=AppliedLinAlg.prj">
71+
<img src="README_media/image_7.png" width="131" alt="image_7.png">
72+
</a><br>
73+
<a href="https://github.com/MathWorks-Teaching-Resources/Applied-Linear-Algebra">GitHub</a><br>
74+
</td>
75+
</tr>
76+
</table>
77+
</div>
78+
79+
Explore our other [<u>modular courseware content</u>](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22&sort=downloads_desc_30d).
80+
81+
# Self\-Paced Online Courses
82+
| [**Multibody Simulation Onramp**](https://matlabacademy.mathworks.com/details/multibody-simulation-onramp/ormb) <br> | [**MATLAB Onramp**](https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted) <br> | [**Stateflow Onramp**](https://matlabacademy.mathworks.com/details/stateflow-onramp/stateflow) <br> |
83+
| :-: | :-: | :--: |
84+
| <img src="README_media/image_8.png" width="171" alt="image_8.png"> <br> | <img src="README_media/image_9.png" width="172" alt="image_9.png"> <br> | <img src="README_media/image_10.png" width="171" alt="image_10.png"> <br> |
85+
86+
# License
87+
The license is available in the <samp>license.txt</samp> file within this repository.
88+
89+
# Contribute
90+
Looking for more? Find an issue? Have a suggestion? Please contact the [<u>MathWorks teaching resources team</u>](mailto:%[email protected]). If you want to contribute directly to this project, you can find information about how to do so in the [<u>CONTRIBUTING.md</u>](./CONTRIBUTING.md) page on GitHub.
91+
92+
Copyright 2024-2025 The MathWorks, Inc.

README.mlx

8.47 MB
Binary file not shown.

README_media/image_0.gif

5.44 MB
Loading

README_media/image_1.gif

3.15 MB
Loading

README_media/image_10.png

21.3 KB
Loading

README_media/image_2.png

10 KB
Loading

README_media/image_3.png

3.37 KB
Loading

README_media/image_4.png

7.01 KB
Loading

README_media/image_5.png

53.9 KB
Loading

README_media/image_6.png

3.37 KB
Loading

README_media/image_7.png

7.01 KB
Loading

README_media/image_8.png

15.1 KB
Loading

README_media/image_9.png

30.6 KB
Loading

SECURITY.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reporting Security Vulnerabilities
2+
3+
If you believe you have discovered a security vulnerability, please report it to
4+
[[email protected]](mailto:[email protected]). Please see
5+
[MathWorks Vulnerability Disclosure Policy for Security Researchers](https://www.mathworks.com/company/aboutus/policies_statements/vulnerability-disclosure-policy.html)
6+
for additional information.

0 commit comments

Comments
 (0)