Ask Your Question
1

Tried to use ROS-Kinetic in Docker Container and then I got Errors

asked 2018-05-20 05:09:23 -0500

someonepassingthrough gravatar image

updated 2018-05-20 05:53:24 -0500

gvdhoorn gravatar image

Hi, I am newbie to ROS, Docker and Ubuntu (wow too beginner lol).

I want to use ROS and the simulator Gazebo for testing my algorithms, but I got Errors shown below when I tried to do "roslaunch" command after I prepared a ros pkg called simple_arm_1 and rviz.launch file.

ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: joint_state_publisher
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [robot_state_publisher/robot_state_publisher]: robot_state_publisher
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [rviz/rviz]: rviz
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
No processes to monitor
shutting down processing monitor...
... shutting down processing monitor complete

Please help me get over this problem.

First of all, I should tell you my development condition, I use

・Ubuntu 18.04 -- as host OS, I know ROS ver older than Lunar doesn't support this ver of Ubuntu

・Docker 17.12.1-ce -- to use Ubuntu 16.04 and ROS Kinetic on a docker container

Yes, I try to use ROS on a docker container. Maybe a silly choice for a beginner like me.

However, I got some error after I did ----------

$ docker pull ros:kinetic   

$ docker run -it ros:kinetic

---and in that container I started

$ roscore

-- opend another terminal and did below to get into the container I just started

$ docker ps -l (to get the running container's id) 

$ docker exec -it  [the running container's id I just got] bash (and I am now in the same container I started before)

--- in the container I did

$ apt-get update 

$ apt-get install vim

$ mkdir catkin_ws

$ cd catkin_ws

$ mkdir src

$ cd src

$ catkin_create_pkg simple_arm_1

$ cd ..

$ catkin_make 

$ source devel/setup.bash

$ roscd simple_arm_1

$ mkdir urdf launch

$ cd urdf

$ vim simple_arm.urdf

--- I wrote those code shown in the link below in the file

https://github.com/embodmt/Gazebo_ROS...

-- after that I did

$ cd ..

$ cd launch

$ vim rviz.launch

--- I wrote those code shown in the link below in the file

https://github.com/embodmt/Gazebo_ROS...

--- now I am ready to get into the part in where I got errors, I did

$ roslaunch simple_arm_1 rviz.launch

--- and errors appeard

ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: joint_state_publisher
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [robot_state_publisher/robot_state_publisher]: robot_state_publisher
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [rviz/rviz]: rviz
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
No processes to monitor
shutting down processing monitor...
... shutting down processing monitor complete

---------- that ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2018-05-22 03:51:16 -0500

Hi,

That because the default Docker image for ROS is "ros-base" that do not include robot-package : see https://hub.docker.com/_/ros/ (Deployment suggestions)

Since you are using docker run -it ros:kinetic , you are using the "ros-base" distro.

If you run docker run -it ros:kinetic-robot, you will use the "robot" distro : the package robot_state_publisher and joint_state_publisher will be installed.

Also you can add the package manually with apt-get install ros-kinetic-robot-state-publisher ros-kinetic-joint-state-publisher if you really need the ros:kinetic image

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

Stats

Asked: 2018-05-20 05:09:23 -0500

Seen: 688 times

Last updated: May 22 '18