0
$\begingroup$

Rosanswers logo

So I've created two files: robot.launch and robot.yaml. Robot.launch contains this:

Robot.yaml contains this:

nxt_robot: - type: touch frame_id: touch_frame name: my_touch_sensor port: PORT_1 desired_frequency: 20.0

When I use roslaunch robot.launch I get:

root@joel:~/learning_nxt# roslaunch robot.launch ... logging to /root/.ros/log/ea9ca04a-da59-11e4-aa30-080027df9655/roslaunch-joel-21391.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.

error loading tag: file does not exist [/opt/ros/electric/stacks/nxt/learning_nxt/robot.yaml] XML is root@joel:~/learning_nxt#

Then when I run roslaunch robot.yaml I get:

root@joel:~/learning_nxt# roslaunch robot.yaml ... logging to /root/.ros/log/158aef32-da5a-11e4-aa30-080027df9655/roslaunch-joel-21400.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.

Invalid roslaunch XML syntax: syntax error: line 1, column 0 root@joel:~/learning_nxt#

What is wrong here? I input the contents of the file robot.yaml into http://yaml-online-parser.appspot.com/ and it says that there is nothing wrong with the text.

By the way, I am following these instrucutons: http://wiki.ros.org/nxt_ros/Tutorials/Getting%20started - steps (3.2), (3.3) and (3.4)


Originally posted by Joelac0193 on ROS Answers with karma: 41 on 2015-04-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The second error is occurring because your robot.yaml is YAML and not XML, which is what roslaunch will parse when running.

The first error appears to be referring to the file robot.yaml at the location: /opt/ros/electric/stacks/nxt/learning_nxt/robot.yaml

Is that in fact where you're robot.yaml is located in the file hierarchy? That is where roslaunch is looking for it.


Originally posted by aak2166 with karma: 593 on 2015-04-04

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Joelac0193 on 2015-04-04:
Thanks for pointing that out! Turns out the file was somewhere else. Thanks!

$\endgroup$

Your Answer

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