Skip to content

Conversation

@tony-p
Copy link
Contributor

@tony-p tony-p commented Jun 9, 2025

Updates based on post merge review comments in #73

Resolve #67

@ruben-arts
Copy link
Contributor

Wait, this can be done easier, let me test some commands.

@ruben-arts
Copy link
Contributor

I'm planning to simplify it to something like this:

[project]
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"]

# This will automatically activate the ros workspace on activation
[target.win-64.activation]
scripts = ["install/setup.bat"]

[target.unix.activation]
# For activation scripts, we use bash for Unix-like systems
scripts = ["install/setup.bash"] 

[target.win-64.dependencies]
# vs2022_win-64 = "*"  # Uncomment if using Visual Studio 2022

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

rosdep = "*"
colcon-common-extensions = "*"


[target.linux.dependencies]
libgl-devel = "*"

# Define all the different ROS environments
# Each environment corresponds to a different ROS distribution
# and can be activated using the `pixi run/shell -e <environment>` command.
[environments]
noetic = { features = ["noetic"] }
humble = { features = ["humble"] }
jazzy = { features = ["jazzy"] }
kilted = { features = ["kilted"] }

### ROS Noetic ####  
[feature.noetic]
channels = ["https://prefix.dev/robostack-noetic"]

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

# To build you can use - pixi run -e noetic build <Any other temporary args>
[feature.noetic.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.noetic.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"


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

[feature.humble.dependencies]
ros-humble-desktop = "*"

# To build you can use - pixi run -e humble build <Any other temporary args>
[feature.humble.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.humble.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"


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

[feature.jazzy.dependencies]
ros-jazzy-desktop = "*"

# To build you can use - pixi run -e jazzy build <Any other temporary args>
[feature.jazzy.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.jazzy.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"


### ROS Kilted ####
[feature.kilted]
channels = ["https://prefix.dev/robostack-kilted"]

[feature.kilted.dependencies]
ros-kilted-desktop = "*"

# To build you can use - pixi run -e kilted build <Any other temporary args>
[feature.kilted.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.kilted.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

I can further simplify it by resuing the tasks, also do you want to use colcon or catkin for noetic?

ps. even better IMO would be to make it tabbed per distro what do you think about that?

@tony-p
Copy link
Contributor Author

tony-p commented Jun 26, 2025

I'm planning to simplify it to something like this:

[project]
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"]

# This will automatically activate the ros workspace on activation
[target.win-64.activation]
scripts = ["install/setup.bat"]

[target.unix.activation]
# For activation scripts, we use bash for Unix-like systems
scripts = ["install/setup.bash"] 

[target.win-64.dependencies]
# vs2022_win-64 = "*"  # Uncomment if using Visual Studio 2022

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

rosdep = "*"
colcon-common-extensions = "*"


[target.linux.dependencies]
libgl-devel = "*"

# Define all the different ROS environments
# Each environment corresponds to a different ROS distribution
# and can be activated using the `pixi run/shell -e <environment>` command.
[environments]
noetic = { features = ["noetic"] }
humble = { features = ["humble"] }
jazzy = { features = ["jazzy"] }
kilted = { features = ["kilted"] }

### ROS Noetic ####  
[feature.noetic]
channels = ["https://prefix.dev/robostack-noetic"]

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

# To build you can use - pixi run -e noetic build <Any other temporary args>
[feature.noetic.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.noetic.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"


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

[feature.humble.dependencies]
ros-humble-desktop = "*"

# To build you can use - pixi run -e humble build <Any other temporary args>
[feature.humble.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.humble.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"


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

[feature.jazzy.dependencies]
ros-jazzy-desktop = "*"

# To build you can use - pixi run -e jazzy build <Any other temporary args>
[feature.jazzy.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.jazzy.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"


### ROS Kilted ####
[feature.kilted]
channels = ["https://prefix.dev/robostack-kilted"]

[feature.kilted.dependencies]
ros-kilted-desktop = "*"

# To build you can use - pixi run -e kilted build <Any other temporary args>
[feature.kilted.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.kilted.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

I can further simplify it by resuing the tasks, also do you want to use colcon or catkin for noetic?

ps. even better IMO would be to make it tabbed per distro what do you think about that?

I was wondering if there was a way to do it more per OS (hadn't really looked into it though) so looks good to me.

With regards to making it tabbed, up to @traversaro and @Tobias-Fischer

@ruben-arts
Copy link
Contributor

ruben-arts commented Jun 26, 2025

[project]
name = "robostack"
description = "Development environment for RoboStack ROS packages"
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64", "linux-aarch64"]

# This will automatically activate the ros workspace on activation
[target.win.activation]
scripts = ["install/setup.bat"]

[target.unix.activation]
# For activation scripts, we use bash for Unix-like systems
scripts = ["install/setup.bash"] 

[target.win-64.dependencies]
# vs2022_win-64 = "*"  # Uncomment if using Visual Studio 2022

# To build you can use - `pixi run -e <ros distro> build <Any other temporary args>`
[feature.build.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.build.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

# Dependencies used by all environments
[dependencies]
python = "*"
# Build tools
compilers = "*"
cmake = "*"
pkg-config = "*"
make = "*"
ninja = "*"
# ROS specific tools
rosdep = "*"
colcon-common-extensions = "*"

[target.linux.dependencies]
libgl-devel = "*"

# Define all the different ROS environments
# Each environment corresponds to a different ROS distribution
# and can be activated using the `pixi run/shell -e <environment>` command.
[environments]
noetic = { features = ["noetic", "build"] }
humble = { features = ["humble", "build"] }
jazzy = { features = ["jazzy", "build"] }
kilted = { features = ["kilted", "build"] }

### ROS Noetic ####  
[feature.noetic]
channels = ["https://prefix.dev/robostack-noetic"]

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

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

[feature.humble.dependencies]
ros-humble-desktop = "*"

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

[feature.jazzy.dependencies]
ros-jazzy-desktop = "*"

### ROS Kilted ####
[feature.kilted]
channels = ["https://prefix.dev/robostack-kilted"]

[feature.kilted.dependencies]
ros-kilted-desktop = "*"

Shrinked it down some more, for this example it didn't seem to matter that we use the same cmake flags for all distro's

edit: added the build feature for the tasks, so the default env will not be used.

@ruben-arts
Copy link
Contributor

Tabbed can always be done later!

@tony-p
Copy link
Contributor Author

tony-p commented Jun 26, 2025

[project]
name = "robostack"
description = "Development environment for RoboStack ROS packages"
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64", "linux-aarch64"]

# This will automatically activate the ros workspace on activation
[target.win.activation]
scripts = ["install/setup.bat"]

[target.unix.activation]
# For activation scripts, we use bash for Unix-like systems
scripts = ["install/setup.bash"] 

[target.win-64.dependencies]
# vs2022_win-64 = "*"  # Uncomment if using Visual Studio 2022

# To build you can use - `pixi run -e <ros distro> build <Any other temporary args>`
[feature.build.target.win-64.tasks]
build = "colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

[feature.build.target.unix.tasks]
build = "colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython_FIND_VIRTUALENV=ONLY -DPython3_FIND_VIRTUALENV=ONLY"

# Dependencies used by all environments
[dependencies]
python = "*"
# Build tools
compilers = "*"
cmake = "*"
pkg-config = "*"
make = "*"
ninja = "*"
# ROS specific tools
rosdep = "*"
colcon-common-extensions = "*"

[target.linux.dependencies]
libgl-devel = "*"

# Define all the different ROS environments
# Each environment corresponds to a different ROS distribution
# and can be activated using the `pixi run/shell -e <environment>` command.
[environments]
noetic = { features = ["noetic", "build"] }
humble = { features = ["humble", "build"] }
jazzy = { features = ["jazzy", "build"] }
kilted = { features = ["kilted", "build"] }

### ROS Noetic ####  
[feature.noetic]
channels = ["https://prefix.dev/robostack-noetic"]

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

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

[feature.humble.dependencies]
ros-humble-desktop = "*"

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

[feature.jazzy.dependencies]
ros-jazzy-desktop = "*"

### ROS Kilted ####
[feature.kilted]
channels = ["https://prefix.dev/robostack-kilted"]

[feature.kilted.dependencies]
ros-kilted-desktop = "*"

Shrinked it down some more, for this example it didn't seem to matter that we use the same cmake flags for all distro's

edit: added the build feature for the tasks, so the default env will not be used.

Updated the PR with this suggestion

@traversaro
Copy link
Member

Go for me, @Tobias-Fischer if you want to have a check and then feel free to merge, thanks @tony-p and @ruben-arts !

@Tobias-Fischer Tobias-Fischer merged commit e6f14ae into RoboStack:master Jun 26, 2025
@Tobias-Fischer
Copy link
Contributor

Nice work thank you very much :)

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.

Add template pixi.toml

4 participants