Ask Your Question

How do I get roscd, rostopic, roscore, rosrun and etc?

asked 2020-01-24 18:41:06 -0500

Guerlando gravatar image

I'm trying to follow the starter guide on ROS Wiki by installin ros distro kinetic (I need this one because the projects that I'm working on need to work on Ubuntu Xenial). Here's my dockerfile:

FROM ubuntu:xenial

RUN apt-get update && apt-get install -y cmake build-essential lsb-core unzip

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cmake git build-essential libboost-all-dev libpcl-dev libproj-dev libvtk6-dev

RUN sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'\
    && apt-key adv --keyserver 'hkp://' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654\
    && apt-get update && apt-get install -y python-rosdep \
    && rosdep init && rosdep update 

ENV LD_LIBRARY_PATH="/opt/ros/kinetic/lib/:${LD_LIBRARY_PATH}"
ENV PATH="/usr/local/lib/quanergy_client_ros/:${PATH}"
ENV ROS_ROOT="/opt/ros/kinetic/share/ros"
ENV ROS_PACKAGE_PATH="/opt/ros/kinetic/share"
ENV ROS_MASTER_URI="http://localhost:11311"
ENV ROS_DISTRO="kinetic"
ENV ROS_ETC_DIR="/opt/ros/kinetic/etc/ros"

The problem is that I don't get any of the tools mentioned in the tutorials like roscd, rostopic, roscore, rosrun, etc. I only have these:

rosdep                        rosdistro_build_cache         rosdistro_migrate_to_rep_141  rosdistro_reformat            
rosdep-source                 rosdistro_freeze_source       rosdistro_migrate_to_rep_143  rosversion

what am I doing wrong?

edit retag flag offensive close merge delete



Can you provide a link for the are following - your command ‘ apt-get install -y python-rosdep’ is only asking for rosdep to be installed.

nickw gravatar image nickw  ( 2020-01-25 00:53:59 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2020-01-25 03:23:55 -0500

marguedas gravatar image

As pointed out by @nickw above: please clarify which tutorial you are following, it's very unusual to install rosdep but not a single ROS package, and to set all the environment variables by hand.

All the executables you are referring to come from different packages:

  • roscd -> ros-kinetic-rosbash
  • roslaunch -> ros-kinetic-roslaunch
  • roscore -> ros-kinetic-roslaunch.
  • rostopic-> ros-kinetic-rostopic

But they are all part of ros-kinetic-ros-core that is usually the minimum set of packages people install to use ROS.

Once installed, you can use ROS provided convenience setup scripts to setup these environment variables for you, located at /opt/ros/kinetic/setup.{bash,sh}

Finally if you want to use docker, you may be interested in the official ROS docker images with all this setup already taken care of. You can use these images as a base for your own docker images e.g. FROM ros:kinetic, FROM ros:kinetic-ros-core etc

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-01-24 18:41:06 -0500

Seen: 27 times

Last updated: Jan 25