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

ros run mavros with permission denied.

asked 2015-11-02 17:31:34 -0600

pinocchio gravatar image

Hi, I am using mavros to read the signals of an AMP2.5 with a GPS connected, on ROS indigo and Ubuntu 14.04.

I install the package by executing

sudo apt-get install ros-indigo-mavros ros-indigo-mavros-extras

It seems that the package is installed correctly. Then I connect the AMP2.5 hardware, the serial number is ttyUSB0. I launch the package by

roslaunch mavros apm2.launch

It shows that 'FCU: DeviceError:serial:open: No such file or directory'.

... logging to /home/alex/.ros/log/a4cdafa8-81b3-11e5-b7f7-ac7ba1b27816/roslaunch-alex-Lenovo-IdeaPad-Y410P-4941.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://alex-Lenovo-IdeaPad-Y410P:54191/

SUMMARY
========

CLEAR PARAMETERS
 * /mavros/

PARAMETERS
 * /mavros/cmd/use_comp_id_system_control: False
 * /mavros/conn/heartbeat_rate: 1.0
 * /mavros/conn/system_time_rate: 0.0
 * /mavros/conn/timeout: 10.0
 * /mavros/conn/timesync_rate: 0.0
 * /mavros/fcu_url: /dev/ttyACM0:57600
 * /mavros/gcs_url: 
 * /mavros/global_position/frame_id: fcu
 * /mavros/global_position/rot_covariance: 99999.0
 * /mavros/global_position/tf/child_frame_id: fcu_utm
 * /mavros/global_position/tf/frame_id: local_origin
 * /mavros/global_position/tf/send: False
 * /mavros/image/frame_id: px4flow
 * /mavros/imu/angular_velocity_stdev: 0.000349065850399
 * /mavros/imu/frame_id: fcu
 * /mavros/imu/linear_acceleration_stdev: 0.0003
 * /mavros/imu/magnetic_stdev: 0.0
 * /mavros/imu/orientation_stdev: 1.0
 * /mavros/local_position/frame_id: fcu
 * /mavros/local_position/tf/child_frame_id: fcu
 * /mavros/local_position/tf/frame_id: local_origin
 * /mavros/local_position/tf/send: False
 * /mavros/mission/pull_after_gcs: True
 * /mavros/mocap/use_pose: True
 * /mavros/mocap/use_tf: False
 * /mavros/plugin_blacklist: ['actuator_contro...
 * /mavros/plugin_whitelist: []
 * /mavros/px4flow/frame_id: px4flow
 * /mavros/px4flow/ranger_fov: 0.0
 * /mavros/px4flow/ranger_max_range: 5.0
 * /mavros/px4flow/ranger_min_range: 0.3
 * /mavros/safety_area/p1/x: 1.0
 * /mavros/safety_area/p1/y: 1.0
 * /mavros/safety_area/p1/z: 1.0
 * /mavros/safety_area/p2/x: -1.0
 * /mavros/safety_area/p2/y: -1.0
 * /mavros/safety_area/p2/z: -1.0
 * /mavros/setpoint_accel/send_force: False
 * /mavros/setpoint_attitude/reverse_throttle: False
 * /mavros/setpoint_attitude/tf/child_frame_id: attitude
 * /mavros/setpoint_attitude/tf/frame_id: local_origin
 * /mavros/setpoint_attitude/tf/listen: False
 * /mavros/setpoint_attitude/tf/rate_limit: 10.0
 * /mavros/setpoint_position/tf/child_frame_id: setpoint
 * /mavros/setpoint_position/tf/frame_id: local_origin
 * /mavros/setpoint_position/tf/listen: False
 * /mavros/setpoint_position/tf/rate_limit: 50.0
 * /mavros/startup_px4_usb_quirk: False
 * /mavros/sys/disable_diag: False
 * /mavros/sys/min_voltage: 10.0
 * /mavros/target_component_id: 1
 * /mavros/target_system_id: 1
 * /mavros/tdr_radio/low_rssi: 40
 * /mavros/time/time_ref_source: fcu
 * /mavros/time/timesync_avg_alpha: 0.6
 * /mavros/vibration/frame_id: vibration
 * /mavros/vision_pose/tf/child_frame_id: vision
 * /mavros/vision_pose/tf/frame_id: local_origin
 * /mavros/vision_pose/tf/listen: False
 * /mavros/vision_pose/tf/rate_limit: 10.0
 * /mavros/vision_speed/listen_twist: False
 * /rosdistro: indigo
 * /rosversion: 1.11.13

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[mavros-1]: started with pid [4960]
[ INFO] [1446505874.563214852]: FCU URL: /dev/ttyACM0:57600
[ INFO] [1446505874.563451461]: serial0: device: /dev/ttyACM0 @ 57600 bps
[FATAL] [1446505874.563723048]: FCU: DeviceError:serial:open: No such file or directory
================================================================================REQUIRED process [mavros-1] has died!
process has finished cleanly
log file: /home/alex/.ros/log/a4cdafa8-81b3-11e5-b7f7-ac7ba1b27816/mavros-1*.log
Initiating shutdown!
================================================================================

Hence, I change the FCU to /dev/ttyUSB0:57600 and GCS to empty.

roslaunch mavros apm.launch fcu_url:=/dev/ttyUSB0:57600 gcs_url:=udp://@

And ... (more)

edit retag flag offensive close merge delete

Comments

I also try sudo roslaunch.. but it says no such command..

pinocchio gravatar image pinocchio  ( 2015-11-02 17:33:38 -0600 )edit

Run

ls -l /dev/ttyUSB0

The result is

crw-rw---- 1 root dialout 188, 0 Nov  2 21:32 /dev/ttyUSB0
pinocchio gravatar image pinocchio  ( 2015-11-02 20:37:37 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
2

answered 2015-11-02 20:51:16 -0600

pinocchio gravatar image

updated 2015-11-02 20:52:15 -0600

 sudo chmod 666 /dev/ttyUSB0

Then run

ls -l /dev/ttyUSB0

The result is

crw-rw-rw- 1 root dialout 188, 0 Nov  2 21:32 /dev/ttyUSB0
edit flag offensive delete link more
1

answered 2015-11-02 23:02:57 -0600

vooon gravatar image

updated 2015-11-03 00:31:30 -0600

Add your user to group dialout and then reboot.

sudo gpasswd -a $USER dialout

After reboot you may check your groups by groups.


Little strange that your APM detected as USB0 (usb-uart adapters like FTDI) rather than ACM0 (USB CDC-ACM protocol which implemented by atmega32u4).

edit flag offensive delete link more

Comments

Hi, thanks for your reply. If I use series port, it detects ttyUSB0, but if I use usb port, it detects ttyACM0.

pinocchio gravatar image pinocchio  ( 2015-11-02 23:44:45 -0600 )edit

Hi @vooon, I still do not know what do FCU and GCS mean. Thank you

pinocchio gravatar image pinocchio  ( 2015-11-02 23:58:48 -0600 )edit

Thanks @vooon. Does it mean I do not need to care for GCS and OBC, if I only read the signal from the IMU?

pinocchio gravatar image pinocchio  ( 2015-11-03 10:04:48 -0600 )edit

Yes, you can leave defaults.

vooon gravatar image vooon  ( 2015-11-03 18:20:12 -0600 )edit
0

answered 2020-09-24 23:31:47 -0600

bigbellmercy gravatar image

updated 2020-09-24 23:32:33 -0600

In a terminal, execute:

sudo usermod -a -G dialout $USER

After rebooting, it works.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-11-02 17:31:34 -0600

Seen: 10,571 times

Last updated: Sep 24 '20