23 |
24 |
25 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/exampleSite/content/post/project.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Project Definition"
3 | description = "Goals, objectives and approach"
4 | date = "2019-08-07"
5 | author = "Christian Decker"
6 | sec = 2
7 | +++
8 |
9 | This section defines concisely the basic project frame.
10 |
11 | ### Goal
12 |
13 | Improve my CV by adding new state-of-the-art development skills.
14 |
15 | ### Approach & Objectives
16 |
17 | * To be able to setup a Raspi from scratch
18 | * To be able to develop a simple command line software
19 | * To enable a software to automatically restart after shutdown / power off
20 | * To enable resilience by monitoring and restarting software processes remotely
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/theme.toml:
--------------------------------------------------------------------------------
1 | name = "OneDly Project"
2 | license = "MIT"
3 | licenselink = "https://github.com/cdeck3r/OneDly-Theme/blob/master/LICENSE.md"
4 | description = "Theme for documenting One-Day-Only (OneDly) projects."
5 | homepage = "https://github.com/cdeck3r/OneDly-Theme"
6 | tags = ["documentation", "landing page", "opensource", "single page"]
7 | features = ["github", "images" ]
8 | min_version= "0.48"
9 |
10 | [author]
11 | name = "Christian Decker"
12 |
13 | # If porting an existing theme
14 | [original]
15 | author = "Omar Abdelhafith"
16 | homepage = "https://github.com/nsomar/github-project-landing-page"
17 | repo = "https://github.com/nsomar/github-project-landing-page"
18 |
19 |
--------------------------------------------------------------------------------
/src/bin/relaxed_ik_bin.rs:
--------------------------------------------------------------------------------
1 | extern crate relaxed_ik_lib;
2 | use relaxed_ik_lib::relaxed_ik;
3 | use nalgebra::{Vector3, UnitQuaternion, Quaternion};
4 |
5 | use std::{io, thread, time};
6 | use crate::relaxed_ik_lib::utils_rust::file_utils::{*};
7 |
8 | fn main() {
9 | // initilize relaxed ik
10 | let path_to_src = get_path_to_src();
11 | let default_path_to_setting = path_to_src + "configs/settings.yaml";
12 | let mut relaxed_ik = relaxed_ik::RelaxedIK::load_settings(default_path_to_setting.as_str());
13 |
14 | for i in 0..10{
15 | for j in 0..relaxed_ik.vars.robot.num_chains {
16 | // gradually move along the y axis
17 | relaxed_ik.vars.goal_positions[j] += Vector3::new(0.0, 0.01, 0.0);
18 | }
19 | let x = relaxed_ik.solve();
20 | println!("Joint solutions: {:?}", x);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/layouts/partials/js.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ if isset .Site.Params "googleAnalytics" }}
11 |
12 |
13 |
23 |
24 | {{ end }}
25 |
--------------------------------------------------------------------------------
/docs/sitemap.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | /post/about/
6 | 2019-08-07T00:00:00+00:00
7 |
8 | /post/contact/
9 | 2019-08-07T00:00:00+00:00
10 |
11 | /post/core/
12 | 2019-08-07T00:00:00+00:00
13 |
14 | /
15 | 2019-08-07T00:00:00+00:00
16 |
17 | /post/
18 | 2019-08-07T00:00:00+00:00
19 |
20 | /post/wrappers/
21 | 2019-08-07T00:00:00+00:00
22 |
23 | /categories/
24 |
25 | /tags/
26 |
27 |
28 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/exampleSite/content/post/conclusion.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Conclusion"
3 | description = "Summary, conclusion and next steps"
4 | date = "2019-08-07"
5 | author = "Christian Decker"
6 | sec = 7
7 | +++
8 |
9 | This section concludes the project.
10 |
11 | ### Summary
12 |
13 | The list below displays the achieved objectives:
14 |
15 | * [x] To be able to setup a Raspi from scratch
16 | * [x] To be able to develop a simple command line software
17 | * [x] To enable a software to automatically restart after shutdown / power off
18 | * [ ] To enable resilience by monitoring and restarting software processes remotely
19 |
20 | ### Conclusion
21 |
22 | I successfully acquired new development skills for raspi computers. They provide a valuable contribution to my CV.
23 |
24 | ### Next Steps
25 |
26 | There are other embedded systems. Will approach them as my next programming plattform.
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/layouts/partials/template.css:
--------------------------------------------------------------------------------
1 | .navbar {
2 | border-color: {{ .Site.Params.first_border_color }};
3 | }
4 |
5 | .content-section-a,
6 | footer,
7 | .navbar {
8 | background-color: {{ .Site.Params.first_color }};
9 | color: {{ .Site.Params.first_text_color }};
10 | }
11 |
12 | .navbar a:link,
13 | .navbar-default .navbar-nav>li>a {
14 | color: {{ .Site.Params.header_link_color }};
15 | }
16 |
17 | .navbar a:hover,
18 | .navbar-default .navbar-nav>li>a:hover {
19 | color: {{ .Site.Params.header_link_hover_color }};
20 | }
21 |
22 | .content-section-b {
23 | background-color: {{ .Site.Params.second_color }};
24 | color: {{ .Site.Params.second_text_color }};
25 | }
26 |
27 | body {
28 | color: {{ .Site.Params.header_text_color }};
29 | }
30 |
31 | .header-container h1,
32 | .header-container h2,
33 | .header-container h3,
34 | .header-container h4 {
35 | color: {{ .Site.Params.header_text_color }};
36 | }
37 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/layouts/partials/main.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ range $index, $element := where (.Site.RegularPages.ByParam "sec") "Section" "in" .Site.Params.mainSections }}
5 | {{ if modBool $index 2 }}
6 |
7 | {{ else }}
8 |
9 | {{ end }}
10 |
11 |
12 |
13 |
14 |
15 |
18 |
{{ .Title }}
19 | {{ replace .Content "
" "
" | safeHTML }}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | {{ end }}
28 |
29 |
30 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/exampleSite/content/post/images.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Section"
3 | description = "Some doc using images"
4 | date = "2019-08-07"
5 | author = "Christian Decker"
6 | sec = 4
7 | +++
8 |
9 | _Source: content taken from [hugoBasicExample](https://github.com/gohugoio/hugoBasicExample). File: `rich-content.md`_
10 |
11 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
12 |
13 | ---
14 |
15 | ## Instagram Simple Shortcode
16 |
17 | {{< instagram_simple BGvuInzyFAe hidecaption >}}
18 |
19 |
20 |
21 | ---
22 |
23 | ## YouTube Privacy Enhanced Shortcode
24 |
25 | {{< youtube ZJthWmvUzzc >}}
26 |
27 |
28 |
29 | ---
30 |
31 | ## Twitter Simple Shortcode
32 |
33 | {{< twitter_simple 1085870671291310081 >}}
34 |
35 |
36 |
37 | ---
38 |
39 | ## Vimeo Simple Shortcode
40 |
41 | {{< vimeo_simple 48912912 >}}
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 UW Graphics Group
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Christian Decker
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "relaxed_ik_core"
3 | version = "0.1.0"
4 | authors = ["djrakita ", "yepw "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | nalgebra = {version = "0.30", features = ["serde-serialize"]}
11 | yaml-rust = "0.4"
12 | optimization_engine = { version = "0.7.7", features = ["wasm"] }
13 | ndarray = "0.13.0"
14 | num = "0.2.0"
15 | time = "0.1"
16 | rand = "0.7.2"
17 | parry3d-f64 = "0.8.0"
18 | path-slash = "0.1.2"
19 | lazy_static = "1.4.0"
20 | csv = "1.1.6"
21 | chrono = "0.4.19"
22 | serde = { version = "1.0.136", features = ["derive"] }
23 | dirs = "4.0.0"
24 | urdf-rs = "0.6.7"
25 | k = "0.29"
26 |
27 | # Below are for webassembly
28 | wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
29 | serde-wasm-bindgen = "0.4"
30 | js-sys = "0.3"
31 | serde_json = "1.0"
32 | console_error_panic_hook = "0.1"
33 |
34 | [dependencies.web-sys]
35 | version = "0.3"
36 | features = [
37 | "console",
38 | ]
39 |
40 | [profile.dev]
41 | opt-level = 3
42 |
43 | [profile.release]
44 | opt-level = 3
45 |
46 | [lib]
47 | name = "relaxed_ik_lib"
48 | path = "src/lib.rs"
49 | crate-type = ["rlib", "cdylib"]
50 | # path = "src/relaxed_ik_web.rs"
51 | # crate-type = ["cdylib"]
52 |
--------------------------------------------------------------------------------
/src/utils_rust/transformations.rs:
--------------------------------------------------------------------------------
1 | use nalgebra::{Vector3, UnitQuaternion, Quaternion, Vector4};
2 |
3 | pub fn quaternion_log(q: UnitQuaternion) -> Vector3 {
4 | let mut out_vec: Vector3 = Vector3::new(q.i, q.j, q.k);
5 | if q.w.abs() < 1.0 {
6 | let a = q.w.acos();
7 | let sina = a.sin();
8 | if sina.abs() >= 0.005 {
9 | let c = a / sina;
10 | out_vec *= c;
11 | }
12 | }
13 | out_vec
14 | }
15 |
16 | pub fn quaternion_exp(v: Vector3) -> UnitQuaternion {
17 | let mut qv: Vector4 = Vector4::new(1.0, v[0], v[1], v[2]);
18 | let a = qv.norm();
19 | let sina = a.sin();
20 | if sina.abs() >= 0.005 {
21 | let c = sina/a;
22 | qv *= c;
23 | }
24 | UnitQuaternion::from_quaternion(Quaternion::new(a.cos(), qv[1], qv[2], qv[3]))
25 | }
26 |
27 | pub fn quaternion_disp(q: UnitQuaternion, q_prime: UnitQuaternion) -> Vector3 {
28 | quaternion_log( q.inverse()*q_prime )
29 | }
30 |
31 | pub fn quaternion_dispQ(q: UnitQuaternion, q_prime: UnitQuaternion) -> UnitQuaternion {
32 | q.inverse()*q_prime
33 | }
34 |
35 | pub fn angle_between_quaternion(q: UnitQuaternion, q_prime: UnitQuaternion) -> f64 {
36 | quaternion_disp(q, q_prime).norm() * 2.0
37 | }
38 |
39 | pub fn quaternion_from_angleaxis(angle: f64, axis: Vector3) -> UnitQuaternion {
40 | let a = angle * 2.0;
41 | let axis_len = axis.norm();
42 | quaternion_exp( axis * (a / axis_len))
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/hugo/themes/onedly/layouts/partials/footer.html:
--------------------------------------------------------------------------------
1 |
2 |
40 | {{ partial "js.html" . }}
41 |
7 | {{ partial "share-links" . }} 8 |
9 |