|
2 | 2 |
|
3 | 3 | Caesar.jl is one of the packages within the [JuliaRobotics](http://www.juliarobotics.org) community, and adheres to the [code-of-conduct](https://github.com/JuliaRobotics/administration/blob/master/code_of_conduct.md). |
4 | 4 |
|
5 | | -## Possible System Dependencies |
| 5 | +## New to Julia |
| 6 | + |
| 7 | +### Installing the Julia Binary |
| 8 | + |
| 9 | +Although [Julia](https://julialang.org/) (or [JuliaPro](https://juliacomputing.com/)) can be installed on a Linux/Mac/Windows via a package manager, we prefer a highly reproducible and self contained (local environment) install. |
| 10 | + |
| 11 | +The easiest method is---via the terminal---[as described on the JuliaLang.org downloads page](https://julialang.org/downloads/). |
| 12 | +!!! note |
| 13 | + Feel free to modify this setup as you see fit. |
| 14 | + |
| 15 | +## VSCode IDE Environment |
| 16 | + |
| 17 | +[VSCode IDE](https://www.julia-vscode.org/) allows for interactive development of Julia code using the Julia Extension. After installing and running VSCode, install the Julia Language Support Extension: |
6 | 18 |
|
7 | | -The following (Linux) system packages are used by Caesar.jl: |
| 19 | +```@raw html |
| 20 | +<p align="center"> |
| 21 | +<img src="https://user-images.githubusercontent.com/6412556/97769200-444fdf80-1aff-11eb-8ca4-dc6d7a3830fd.png" width="800" border="0" /> |
| 22 | +</p> |
8 | 23 | ``` |
9 | | -# Likely dependencies |
10 | | -sudo apt-get install hdf5-tools imagemagick |
11 | 24 |
|
12 | | -# optional packages |
13 | | -sudo apt-get install graphviz xdot |
| 25 | +In VSCode, open the command pallette by pressing `Ctrl + Shift + p`. There are a wealth of tips and tricks on how to use VSCode. See [this JuliaCon presentation for as a general introduction into 'piece-by-piece' code execution and much much more](https://www.youtube.com/watch?v=IdhnP00Y1Ks). Working in one of the Julia IDEs like VS Code or Juno should feel something like this (Gif borrowed from [DiffEqFlux.jl](https://github.com/SciML/DiffEqFlux.jl)): |
| 26 | +```@raw html |
| 27 | +<p align="center"> |
| 28 | +<img src="https://user-images.githubusercontent.com/1814174/88589293-e8207f80-d026-11ea-86e2-8a3feb8252ca.gif" width="800" border="0" /> |
| 29 | +</p> |
14 | 30 | ``` |
15 | 31 |
|
16 | | -For [ROS.org](https://www.ros.org/) users, see at least one usage example at [the ROS Direct page](@ref ros_direct). |
| 32 | +There are a variety of useful packages in VSCode, such as `GitLens`, `LiveShare`, and `Todo Browser` as just a few highlights. These *VSCode Extensions* are independent of the already vast JuliaLang Package Ecosystem (see [JuliaObserver.com](https://juliaobserver.com/)). |
| 33 | + |
| 34 | +!!! note |
| 35 | + For [ROS.org](https://www.ros.org/) users, see at least one usage example at [the ROS Direct page](@ref ros_direct). |
17 | 36 |
|
18 | 37 | ## Installing Julia Packages |
19 | 38 |
|
| 39 | +### Vanilla Install |
| 40 | + |
20 | 41 | The philosophy around Julia packages are discussed at length in the [Julia core documentation](https://docs.julialang.org/en/stable/manual/packages/), where each Julia package relates to a git repository likely found on [Github.com](http://www.github.com). Also see [JuliaHub.com](https://juliahub.com/ui/Packages/Caesar/BNbRm) for dashboard-style representation of the broader Julia package ecosystem. |
21 | | -To install a Julia package, simply open a `julia` REPL (equally the Julia REPL in VSCode) and type: |
| 42 | +To install a Julia package, simply start a `julia` REPL (equally the Julia REPL in VSCode) and then type: |
22 | 43 |
|
23 | 44 | ```julia |
24 | | -] # activate Pkg manager |
25 | | -(v1.6) pkg> add Caesar |
| 45 | +julia> ] # activate Pkg manager |
| 46 | +(v___) pkg> add Caesar |
26 | 47 | ``` |
27 | 48 |
|
| 49 | +### Version Control, Branches |
| 50 | + |
28 | 51 | These are [registered packages](https://pkg.julialang.org/) maintained by [JuliaRegistries/General](http://github.com/JuliaRegistries/General). |
29 | 52 | Unregistered latest packages can also be installed with using only the `Pkg.develop` function: |
30 | 53 |
|
31 | 54 | ```julia |
32 | 55 | # Caesar is registered on JuliaRegistries/General |
33 | 56 | julia> ] |
34 | | -(v1.6) pkg> add Caesar |
35 | | -(v1.6) pkg> add Caesar#janes-awesome-fix-branch |
36 | | -(v1.6) pkg> add Caesar@v0.10.0 |
| 57 | +(v___) pkg> add Caesar |
| 58 | +(v___) pkg> add Caesar#janes-awesome-fix-branch |
| 59 | +(v___) pkg> add Caesar@v0.16 |
37 | 60 |
|
38 | 61 | # or alternatively your own local fork (just using old link as example) |
39 | | -(v1.6) pkg> add https://github.com/dehann/Caesar.jl |
| 62 | +(v___) pkg> add https://github.com/dehann/Caesar.jl |
40 | 63 | ``` |
41 | 64 |
|
42 | | -See [Pkg.jl](https://github.com/JuliaLang/Pkg.jl) for details and features regarding package management, development, version control, virtual environments and much more. |
43 | | - |
44 | | -## Next Steps |
| 65 | +### Virtual Environments |
45 | 66 |
|
46 | | -The sections hereafter describe [Building](@ref building_graphs), [Interacting], and [Solving](@ref solving_graphs) factor graphs. We also recommend reviewing the various examples available in the [Examples section](@ref examples_section). |
47 | | - |
48 | | -## New to Julia |
49 | | - |
50 | | -### Installing the Julia Binary |
51 | | - |
52 | | -Although [Julia](https://julialang.org/) (or [JuliaPro](https://juliacomputing.com/)) can be installed on a Linux computer using the `apt` package manager, we are striving for a fully local installation environment which is highly reproducible on a variety of platforms. |
53 | | - |
54 | | -The easiest method is---via the terminal---to [download the desired](https://julialang.org/downloads/) version of Julia as a binary, extract, setup a symbolic link, and run: |
55 | | - |
56 | | -```bash |
57 | | -cd ~ |
58 | | -mkdir -p .julia |
59 | | -cd .julia |
60 | | -wget https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.7-linux-x86_64.tar.gz |
61 | | -tar -xvf julia-1.6.7-linux-x86_64.tar.gz |
62 | | -rm julia-1.6.7-linux-x86_64.tar.gz |
63 | | -cd /usr/local/bin |
64 | | -sudo ln -s ~/.julia/julia-1.6.7/bin/julia julia |
65 | | -``` |
66 | 67 | !!! note |
67 | | - Feel free to modify this setup as you see fit. |
| 68 | + Julia has native support for virtual environments and exact package manifests. See [Pkg.jl Docs](https://pkgdocs.julialang.org/v1/environments/) for more info. More details and features regarding package management, development, version control, virtual environments are available there. |
68 | 69 |
|
69 | | -This should allow any terminal or process on the computer to run the Julia REPL by type `julia` and testing with: |
| 70 | +## Next Steps |
70 | 71 |
|
71 | | -## VSCode IDE Environment |
| 72 | +The sections hereafter describe [Building](@ref building_graphs), [Interacting], and [Solving](@ref solving_graphs) factor graphs. We also recommend reviewing the various examples available in the [Examples section](@ref examples_section). |
72 | 73 |
|
73 | | -[VSCode IDE](https://www.julia-vscode.org/) allows for interactive development of Julia code using the Julia Extension. After installing and running VSCode, install the Julia Language Support Extension: |
| 74 | +### Possible System Dependencies |
74 | 75 |
|
75 | | -```@raw html |
76 | | -<p align="center"> |
77 | | -<img src="https://user-images.githubusercontent.com/6412556/97769200-444fdf80-1aff-11eb-8ca4-dc6d7a3830fd.png" width="800" border="0" /> |
78 | | -</p> |
| 76 | +The following (Linux) system packages have been required on some systems in the past, but likely does not have to be installed system wide on newer versions of Julia: |
79 | 77 | ``` |
| 78 | +# Likely dependencies |
| 79 | +sudo apt-get install hdf5-tools imagemagick |
80 | 80 |
|
81 | | -In VSCode, open the command pallette by pressing `Ctrl + Shift + p`. There are a wealth of tips and tricks on how to use VSCode. See [this JuliaCon presentation for as a general introduction into 'piece-by-piece' code execution and much much more](https://www.youtube.com/watch?v=IdhnP00Y1Ks). Working in one of the Julia IDEs like VS Code or Juno should feel something like this (Gif borrowed from [DiffEqFlux.jl](https://github.com/SciML/DiffEqFlux.jl)): |
82 | | -```@raw html |
83 | | -<p align="center"> |
84 | | -<img src="https://user-images.githubusercontent.com/1814174/88589293-e8207f80-d026-11ea-86e2-8a3feb8252ca.gif" width="800" border="0" /> |
85 | | -</p> |
| 81 | +# optional packages |
| 82 | +sudo apt-get install graphviz xdot |
86 | 83 | ``` |
87 | | - |
88 | | -There are a variety of useful packages in VSCode, such as `GitLens`, `LiveShare`, and `Todo Browser` as just a few highlights. These *VSCode Extensions* are independent of the already vast JuliaLang Package Ecosystem (see [JuliaObserver.com](https://juliaobserver.com/)). |
89 | | - |
0 commit comments