gbiggs / rtshell

Shell commands for managing RT-Middleware running on OpenRTM-aist.
http://openrtm.org
GNU Lesser General Public License v3.0
10 stars 17 forks source link

rtprint does not handle parentheses #16

Closed francois-keith closed 10 years ago

francois-keith commented 10 years ago

Dear Geoffrey Gibbs,

There is an issue when using rtprint on ports that contain parentheses, such as /localhost/HRPController(Robot)0.rtc:q.

The commands fails with the following error:

$ print /localhost/HRPController\(Robot\)0.rtc:q
rtprint: Bad port specification: /localhost/HRPController(Robot)0.rtc:q

Tracking it down, the problem seems to come from the following regex command, that does not handle parentheses and crashes.

regex = re.compile(r'^(?P[:\-\w/.]+?)(?:\.(?P\w+))?(?:#(?P

https://github.com/gbiggs/rtshell/blob/master/rtshell/port_types.py#L182-L182

Note that once this regex problem is the only obstacle, since hard-coding the value of the raw_path, such as:

raw_path = '/localhost/HRPController(Robot)0.rtc:gyrometer'

before

path, port = rtctree.path.parse_path(raw_path)

displays correctly the value of the gyrometer signal.

Regards

François Keith

Note: this has been observed on Ubuntu 10.04 32bits.