11#! /bin/bash
22
3+ set -e
4+
35# define color
46RED=' \033[0;31m'
57GREEN=' \033[0;32m'
7274 echo -e " ${BLUE} Found Conda in $CONDA_EXE ${NC} , install Mamba to base environment"
7375 eval " $( $CONDA_EXE shell.bash hook) "
7476 conda activate base
75- conda install mamba -c conda-forge --yes
77+ conda install -n base mamba -c conda-forge --yes
7678 mamba init --all
7779
7880 # manually enable mamba
@@ -102,9 +104,9 @@ echo -e "${BLUE}Finish Settting up RoboStack Env${NC}"
102104
103105conda activate ros_base
104106
105- mamba install compilers cmake pkg-config make ninja -c conda-forge --override-channels --yes
107+ mamba install -n ros_base compilers cmake pkg-config make ninja -c conda-forge --override-channels --yes
106108
107- mamba install catkin_tools -c conda-forge -c robostack -c robostack-experimental --yes
109+ mamba install -n ros_base catkin_tools -c conda-forge -c robostack -c robostack-experimental --yes
108110
109111# reload environment to activate required scripts before running anything
110112# on Windows, please restart the Anaconda Prompt / Command Prompt!
@@ -113,13 +115,13 @@ conda activate ros_base
113115
114116
115117# if you want to use rosdep, also do:
116- mamba install rosdep -c conda-forge -c robostack -c robostack-experimental --yes
118+ mamba install -n ros_base rosdep -c conda-forge -c robostack -c robostack-experimental --yes
117119rosdep init # note: do not use sudo!
118120rosdep update
119121
120122echo -e " ${BLUE} Install Dependency${NC} "
121123
122- mamba install numpy scipy matplotlib networkx shapely jupyter notebook -c conda-forge --yes
124+ mamba install -n ros_base numpy scipy matplotlib networkx shapely jupyter notebook -c conda-forge --yes
123125
124126
125127echo -e " ${BLUE} Install PySpline${NC} "
@@ -128,7 +130,7 @@ if [[ $OS == 'Darwin' ]]; then
128130 if [[ $ARCH == ' arm64' ]]; then
129131 echo -e " ${GREEN} You are using Mac OS with Apple Silicon${NC} "
130132 # this avoid segfault when importing hppfcl
131- mamba install eigenpy=2.7.10 --yes -c conda-forge
133+ mamba install -n ros_base eigenpy=2.7.10 --yes -c conda-forge
132134 pip install osx_arm/pyspline-1.5.2-py3-none-any.whl
133135 elif [[ $ARCH == ' x86_64' ]]; then
134136 echo -e " ${GREEN} You are using Mac OS with X86${NC} "
159161
160162echo -e " ${BLUE} Install Jax${NC} "
161163# Instal Jax https://github.com/google/jax#conda-installation
162- mamba install jax=0.3.22 ' jaxlib=0.3.22=cpu*' -c conda-forge --yes
164+ mamba install -n ros_base jax=0.3.22 ' jaxlib=0.3.22=cpu*' -c conda-forge --yes
163165
164166echo -e " ${BLUE} Install Hpp-FCL${NC} "
165167
166- mamba install -c conda-forge hpp-fcl --yes
168+ mamba install -n ros_base - c conda-forge hpp-fcl --yes
167169
168170echo -e " ${Green} Finished! Reopen a new terminal to see if everything works. ${NC} "
0 commit comments