0
$\begingroup$

Rosanswers logo

hello,

I had to re-install my Ubuntu 16.04 with kinetic for some reasons. How ever, I tried to re-install all the work I've done before on the project. All the workspaces where saved in my onwcloud, so i thought it should be an easy thing to do. Wrong :)

As I tried just to recompile the workspace with catkin_make everything failed an i tried to build from a new and clean workspace. There is a node that uses some serial communication,so i need to add the rosserial pkg to my system. First try by sudo apt-get install ros-kinetic-serial. then I did catkin_make. Everything fine so far. BUT when i start the node with rosrun an exeption ocoured:

IO Exception (13): Permission denied, file /tmp/binarydeb/ros-kinetic-serial-1.2.1/src/impl/unix.cc, line 151.

Just to check, i manually install the serial-pkg in my workspace and build both mith catkin. Now ther ist that error:

IO Exception (13): Permission denied, file /home/eddie/owncloud/eddie_ws/src/serial/src/impl/unix.cc, line 151.

which is basicly the same.

The piece of code with this revers to ist that: (l.151 is the default case)

void
Serial::SerialImpl::open ()
{
  if (port_.empty ()) {
    throw invalid_argument ("Empty port is invalid.");
  }
  if (is_open_ == true) {
    throw SerialException ("Serial port already open.");
  }

  fd_ = ::open (port_.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK);

  if (fd_ == -1) {
    switch (errno) {
    case EINTR:
      // Recurse because this is a recoverable error.
      open ();
      return;
    case ENFILE:
    case EMFILE:
      THROW (IOException, "Too many file handles open.");
    default:
      THROW (IOException, errno);
    }
  }

  reconfigurePort();
  is_open_ = true;
}

Does anyone has any ideas? thank you all! p.s. the hole thing worked very good before the re installation.


Originally posted by lorenznew on ROS Answers with karma: 123 on 2018-09-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You most likely had a udev file that set the correct permissions on your serial port so your user had read/write access.

Or on your old installation your user account was a member of the dialout group. See #q189457 for what is probably a related question.


Originally posted by gvdhoorn with karma: 86574 on 2018-09-11

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by lorenznew on 2018-09-12:
WOW! nice! Thank you! I found the solution thanks to your comment! Just need to do: sudo adduser <second_user> dialout and restart the PC. Thanks!!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.