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

Problem in running brown driver ?

asked 2013-07-08 15:33:53 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Every time when I need to start the brown_drivers irobot_create_2_1 I need to change the port /dev/ttyS0 to /dev/ttyACM0 using terminal command.

rosparam set /brown/irobot_create_2_1/port /dev/ttyACM0

moreover I need to get permission to open the port ttyACM0 (using terminal command as bellow) as my user at ubuntu system do not have access.

sudo chmod 0777 /dev/ttyACM0

Please tell me what change should I make in driver.py node of irobot_create_2_1 package so that I need not to change the port from /dev/ttyS0 to /dev/ttyACM0 every time? Please do tell me how I can get permanent access to open the port /dev/ttyACM0.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-07-09 03:30:06 -0500

thebyohazard gravatar image

It sounds like you need to write a udev rule. udev can map new devices to whatever name you want and can even change permissions. There are lots of guides on the interwebs for how to do this, and this one should get you started. Good luck.

edit flag offensive delete link more

Comments

I had a first look on to the link. It seems to be very helpful. I hope to get it done. Thank you.

lifelonglearner gravatar image lifelonglearner  ( 2013-07-09 17:06:38 -0500 )edit
0

answered 2013-07-29 16:28:25 -0500

lifelonglearner gravatar image

In place of using command

rosparam set /brown/irobot_create_2_1/port /dev/ttyACM0

we can make a change in driver.py in a line as bellow

class CreateDriver:
    def __init__(self):
        port = rospy.get_param('/brown/irobot_create_2_1/port', "/dev/ttyUSB0")

Just change "/dev/ttyUSB0" by "/dev/ttyACM0"

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-07-08 15:33:53 -0500

Seen: 193 times

Last updated: Jul 29 '13