ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

ROS2 fish shell setup?

asked 2021-07-30 22:09:15 -0500

Jason1923 gravatar image

Hi, so I understand we need to source setup.bash every time to use the ros2 CLI. Is there any script to do this in fish shell?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-08-01 08:54:15 -0500

Kenji Miyake gravatar image

You can use https://github.com/edc/bass to do that.

bass source /opt/ros/galactic/setup.bash

Also, if you launch fish after sourcing in bash, env values will be reflected.

// .bashrc
source /opt/ros/galactic/setup.bash
fish

For more advanced use cases, please take a look at my settings if you are interested. I've developed a couple of useful plugins.๐Ÿ˜€

edit flag offensive delete link more

Comments

Thanks so much! I noticed you source rosfish so I checked that out. Is that only a ROS 1 thing? Can I use it for ROS 2 Eloquent?

Jason1923 gravatar image Jason1923  ( 2021-08-10 23:41:08 -0500 )edit
1

@Jason1923 Yes, it's for ROS1. This does the equivalent things in ROS2.

register-python-argcomplete --shell fish ros2 | source

FYI: If this PR is merged, I guess argcompleteis automatically loaded. https://github.com/ros2/ros2cli/pull/326

Kenji Miyake gravatar image Kenji Miyake  ( 2021-08-11 02:36:49 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-07-30 22:09:15 -0500

Seen: 858 times

Last updated: Aug 01 '21