Skip to content

Commit

Permalink
Merge pull request #6 from danthony06/add_noetic_support
Browse files Browse the repository at this point in the history
Adding Noetic support
  • Loading branch information
evan-palmer committed Jun 7, 2022
2 parents 3d63343 + db83a10 commit 0e399dd
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions setupEnv.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
dir_names = dir('/opt/ros');
dir_names = dir_names([dir_names.isdir]);
ros_root = '';
python_version = 2;

% Iterate through the found directories and add the latest ROS
% distribution as the ROS root location. By placing the switch clauses
Expand All @@ -75,6 +76,9 @@
ros_root = '/opt/ros/jade';
case 'kinetic'
ros_root = '/opt/ros/kinetic';
case 'noetic'
ros_root = '/opt/ros/noetic';
python_version = 3;
otherwise
end
end
Expand All @@ -90,9 +94,17 @@
% subdirectories, depending on the OS
os = computer;
if(strcmpi(os, 'MACI64'))
ros_root = fullfile(ros_root, 'lib', 'python2.7', 'site-packages');
if(python_version == 2)
ros_root = fullfile(ros_root, 'lib', 'python2.7', 'site-packages');
else
ros_root = fullfile(ros_root, 'lib', 'python3', 'site-packages');
end
else
ros_root = fullfile(ros_root, 'lib', 'python2.7', 'dist-packages');
if(python_version == 2)
ros_root = fullfile(ros_root, 'lib', 'python2.7', 'dist-packages');
else
ros_root = fullfile(ros_root, 'lib', 'python3', 'dist-packages');
end
end
end
end
Expand Down Expand Up @@ -143,4 +155,4 @@
insert(P, int32(0), module_location);
end
end
end
end

0 comments on commit 0e399dd

Please sign in to comment.