Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation to add pixi.toml and to reflect move away from robostack-staging channel #73

Merged
merged 13 commits into from
Mar 6, 2025

Conversation

TedVanderfeen
Copy link
Contributor

@TedVanderfeen TedVanderfeen commented Feb 11, 2025

Initial change so that I can open the PR:
Changed installation > installing for clarity

Addresses #67 and better reflects #68

Changed installation > installing for clarity
@TedVanderfeen
Copy link
Contributor Author

TedVanderfeen commented Feb 12, 2025

Draft pixi.toml for comment.
I've setup the different distributions as environments so the setup steps for this would be:

#create the pixi project folder and pixi.toml file
pixi init robostack
#move to the pixi project folder
cd robostack

Open the created pixi.toml in any text editor and paste the below into the file (remove the configuration created by pixi init):

[project]
# Prerequisites:
# - Windows: Visual Studio Build Tools or Visual Studio (2019 or 2022)
#   see https://docs.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-160
# - Pixi package manager: https://pixi.sh
name = "robostack"
version = "0.1.0"
description = "Development environment for RoboStack ROS packages"
authors = ["Your Name <[email protected]>"]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64", "linux-aarch64"]

[dependencies]
python = "==3.11"
compilers = "*"
cmake = "*"
pkg-config = "*"
make = "*"
ninja = "*"

[environments]
noetic = { features = ["noetic"] }
humble = { features = ["humble"] }
jazzy = { features = ["jazzy"] }

[target.win-64.dependencies]
# if using Windows, uncomment ONE Visual Studio version:
#vs2019_win-64 = "*"  # For VS 2019
#vs2022_win-64 = "*"  # For VS 2022

#noetic
[feature.noetic]
#channels = ["https://prefix.dev/robostack-noetic"] 
channels = ["https://prefix.dev/robostack-staging"] ##TODO Remove staging once robostack-noetic is available in the prefix.dev catalog

[feature.noetic.dependencies]
ros-noetic-desktop = "*"
catkin_tools = "*"
rosdep = "*"

#humble
[feature.humble]
channels = ["https://prefix.dev/robostack-humble"]

[feature.humble.dependencies]
ros-humble-desktop = "*"
colcon-common-extensions = "*"
rosdep = "*"

#jazzy
[feature.jazzy]
channels = ["https://prefix.dev/robostack-jazzy"]

[feature.jazzy.dependencies]
ros-jazzy-desktop = "*"
colcon-common-extensions = "*"
rosdep = "*"

Save and Exit
Start an environment with your desired robostack distribution using one of the below commands:
ROS noetic

pixi shell -e noetic

ROS humble

pixi shell -e humble

ROS jazzy

pixi shell -e jazzy

@traversaro
Copy link
Member

Thanks!

Regarding the section:

[target.win-64.dependencies]
# if using Windows, uncomment ONE Visual Studio version:
#vs2019_win-64 = "*"  # For VS 2019
#vs2022_win-64 = "*"  # For VS 2022

As of the latest version of February 2025, the compilers meta-package depends on vs2019_win-64, so vs2022_win-64 is only necessary if you only have VS2022 installed (and not VS2019) or if you strictly need VS2022. To be honest I do not know how to write down in a user friendly way at the moment, but I wanted to write it down this in a comment.

@TedVanderfeen
Copy link
Contributor Author

Thanks for the heads up. Will have a look at that when I get a chance.

@TedVanderfeen TedVanderfeen marked this pull request as ready for review February 13, 2025 08:01
@TedVanderfeen
Copy link
Contributor Author

TedVanderfeen commented Feb 13, 2025

Have set this up using tabs rather than sub-pages under gettingstarted. Tabs separate the page into mamba/pixi. At the moment the intention is for users to copy the pixi.toml config from the getting started guide and paste it into their own local copy created by pixi init __. But I'm not sure if I'm 100% happy with that solution. Any thoughts/comments/concerns?

It also looks like we're still blocked by #74, so not quite ready to merge yet.

@TedVanderfeen TedVanderfeen marked this pull request as draft February 13, 2025 08:50
@TedVanderfeen
Copy link
Contributor Author

Having some issues with the environments and need to figure out if it's because of Windows or my pixi.toml..

@traversaro
Copy link
Member

Have set this up using tabs rather than sub-pages under gettingstarted. Tabs separate the page into mamba/pixi.

Thanks for this! I think this is great.

At the moment the intention is for users to copy the pixi.toml config from the getting started guide and paste it into their own local copy created by pixi init __. But I'm not sure if I'm 100% happy with that solution. Any thoughts/comments/concerns?

I think this is probably a good idea. Once pixi will have more advanced templating capability we can use it (see prefix-dev/pixi#2837), but for now a good&old documentation to copy paste is already a great improvement on the current status quo.

@traversaro
Copy link
Member

I opened RoboStack/ros-noetic#506 to unblock the situation on the noetic side.

@TedVanderfeen
Copy link
Contributor Author

Humble and Jazzy environments tested and working.

@TedVanderfeen TedVanderfeen marked this pull request as ready for review March 5, 2025 07:31
@TedVanderfeen
Copy link
Contributor Author

I am happy to report that all environments are now installing and activating correctly from the prefix.dev channels. This updated documentation should be good to go.

@traversaro
Copy link
Member

I am happy to report that all environments are now installing and activating correctly from the prefix.dev channels. This updated documentation should be good to go.

Thanks a lot for all the work!

Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I left some minor comments inline, but as this is already a huge improvements over the status quo, for me the PR could also be merged as it is and do the improvements in follow up PRs.

TedVanderfeen and others added 4 commits March 5, 2025 18:44
Removed explicit setting of python version.

Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
batch commit with suggestions implemented

Co-authored-by: Silvio Traversaro <[email protected]>
@TedVanderfeen
Copy link
Contributor Author

Suggestions committed, thanks @traversaro!

@Tobias-Fischer
Copy link
Contributor

Thanks a lot @TedVanderfeen - this is great! And thanks for the review @traversaro.

@Tobias-Fischer Tobias-Fischer merged commit eae1e49 into RoboStack:master Mar 6, 2025

!!! warning "PowerShell is not supported"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Powershell works for us? It can currupt the environment when using poxi shell, but that is the same for cmd. I thought the no PS support was a mamba issue?

mamba activate ros_env
rviz
Open the newly created pixi.toml in your favourite text editor and paste the below configuration into the file (overwriting the configuration created by `pixi init`):
``` bash title="pixi.toml"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add the automatic sourcing of the ros workspace environment on activation, and a default build task/command that includes cmake flags pointing python to the virtual installs


!!! note
Remember that Pixi environments can only be activated from within your project directory.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not technically true, they initialise by default from the project directory

roscore
```

```bash title="Second terminal"
micromamba activate ros_env
cd robostack
pixi shell -e noetic
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just pixi run rviz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants