Hardware Reference
In-Depth Information
* /rosversion
NODES
/
nxt_ros (nxt_ros/nxt_ros.py)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[nxt_ros-1]: started with pid [21027]
[INFO] [WallTime: 1378757674.921416] Creating touch with name my_touch_sen
sor on PORT_1
You should see output similar to these messages, which indicate that ROS is running
your robot. It will not return you to a shell prompt and will run in that session until you
kill it (Ctrl+C will do the trick). Go ahead and open a second session to your Raspberry
Pi.
This robot configuration defines one sensor: my_touch_sensor . You can confirm that
this touch sensor is active by running the rostopic list command:
$ rostopic list
/my_touch_sensor
/rosout
/rosout_agg
You can see the raw output from the touch sensor by running rostopic echo
my_touch_sensor . This will stream a running status to your terminal as the headers
come in from the touch sensor. Press and hold the touch sensor and note that the
contact field changes from False to True :
header:
seq: 2088
stamp:
secs: 1378758120
nsecs: 589009046
frame_id: touch_frame
contact: True
If you want to add a servo motor (connected to output Port A), you could add a section
like this to your robot.yaml :
- type: motor
name: l_motor_joint
port: PORT_A
desired_frequency: 10.0
Search WWH ::




Custom Search