Only released in EOL distros:  

nxt: nxt_controllers | nxt_description | nxt_lxf2urdf | nxt_msgs | nxt_python | nxt_ros | nxt_rviz_plugin

Package Summary

The nxt_ros package provides the bindings between the NXT world and the ROS world. This package will create a ROS topic for each NXT sensor, and publish the sensor's data on this topic. The package also creates a topic for each NXT motor, which allows you to command the motor from ROS. The nxt_ros bindings talk directly to the NXT brick, either over USB or over Bluetooth (note that the Bluetooth connection is currently too slow to be very useful). Binding an NXT robot to ROS only requires a single configuration file.

nxt: nxt_controllers | nxt_description | nxt_lxf2urdf | nxt_msgs | nxt_python | nxt_ros | nxt_rviz_plugin

Package Summary

The nxt_ros package provides the bindings between the NXT world and the ROS world. This package will create a ROS topic for each NXT sensor, and publish the sensor's data on this topic. The package also creates a topic for each NXT motor, which allows you to command the motor from ROS. The nxt_ros bindings talk directly to the NXT brick, either over USB or over Bluetooth (note that the Bluetooth connection is currently too slow to be very useful). Binding an NXT robot to ROS only requires a single configuration file.

ROS API

The sections below describe how to configure the NXT to ROS bindings.

Example

Even though the API description looks quite complicated, it's very easy to configure the bindings. Here is an example configuration:

nxt_robot:
  - type: motor
    name: r_wheel_joint
    port: PORT_A
    desired_frequency: 20.0

  - type: motor
    name: l_wheel_joint
    port: PORT_B
    desired_frequency: 20.0

  - type: gyro
    name: gyro
    frame_id: gyro_link
    port: PORT_3
    offset: 0
    desired_frequency: 20.0

  - type: ultrasonic
    frame_id: ultrasonic_link
    name: ultrasonic_sensor
    port: PORT_2
    spread_angle: 0.2
    min_range: 0.01
    max_range: 2.5
    desired_frequency: 5.0

Motor

ROS API for the NXT motor

Subscribed Topics

~<name> (nxt_msgs/JointCommand)
  • The joint effort to apply at the joint

Published Topics

~joint_state (sensor_msgs/JointState)
  • The current effort, position, and velocity of the servo motors.

Parameters

~nxt_robot/type (string, default: None)
  • The type should be set to "motor".
~nxt_robot/port (string, default: None)
  • This should be one of the brick ports: PORT_A, PORT_B or PORT_C.
~nxt_robot/desired_frequency (double, default: None)
  • The desired update frequency for the actuator and sensor.
~nxt_robot/name (string, default: None)
  • The topic name for the sensor data.

Ultrasonic Sensor

ROS API for the ultrasonic sensor

Published Topics

~<name> (nxt_msgs/Range)

Parameters

~nxt_robot/type (string, default: None)
  • The type should be set to "ultrasonic".
~nxt_robot/port (string, default: None)
  • This should be one of the brick ports: PORT_1, PORT_2, PORT_3, or PORT_4.
~nxt_robot/desired_frequency (double, default: None)
  • The desired update frequency for the sensor.
~nxt_robot/name (string, default: None)
  • The topic name for the sensor data.
~nxt_robot/frame_id (string, default: None)
  • The frame that the sensor data is published in.
~spread_angle (double)
  • The angle that describes the cone shape of the ultrasonic beam.
~min_range (double)
  • The minimum distance the ultrasonic sensor can measure (meters)
~max_range (double)
  • The maximum distance the ultrasonic sensor can measure (meters)

Touch Sensor

ROS API for the touch sensor

Published Topics

~<name> (nxt_msgs/Contact)
  • The state of the touch sensor (touching or not).

Parameters

~nxt_robot/type (string, default: None)
  • The type should be set to "touch".
~nxt_robot/port (string, default: None)
  • This should be one of the brick ports: PORT_1, PORT_2, PORT_3, or PORT_4.
~nxt_robot/desired_frequency (double, default: None)
  • The desired update frequency for the sensor.
~nxt_robot/name (string, default: None)
  • The topic name for the sensor data.
~nxt_robot/frame_id (string, default: None)
  • The frame that the sensor data is published in.

Color Sensor

ROS API for the color sensor

Published Topics

~<name> (nxt_msgs/Color)
  • Color value measured from the color sensor.

Parameters

~nxt_robot/type (string, default: None)
  • The type should be set to "color".
~nxt_robot/port (string, default: None)
  • This should be one of the brick ports: PORT_1, PORT_2, PORT_3, or PORT_4.
~nxt_robot/desired_frequency (double, default: None)
  • The desired update frequency for the sensor.
~nxt_robot/name (string, default: None)
  • The topic name for the sensor data.
~nxt_robot/frame_id (string, default: None)
  • The frame that the sensor data is published in.

Gyro Sensor

ROS API for the gyro sensor

Published Topics

~<name> (sensor_msgs/Imu)
  • Rotation rate data from the gyro sensor.

Parameters

~nxt_robot/type (string, default: None)
  • The type should be set to "gyro".
~nxt_robot/port (string, default: None)
  • This should be one of the brick ports: PORT_1, PORT_2, PORT_3, or PORT_4.
~nxt_robot/desired_frequency (double, default: None)
  • The desired update frequency for the sensor.
~nxt_robot/name (string, default: None)
  • The topic name for the sensor data.
~nxt_robot/frame_id (string, default: None)
  • The frame that the sensor data is published in.

Accelerometer Sensor

ROS API for the accelerometer sensor

Published Topics

~<name> (nxt_msgs/Accelerometer)
  • The three axis measured values form the accelerometer sensor.

Parameters

~nxt_robot/type (string, default: None)
  • The type should be set to "accelerometer".
~nxt_robot/port (string, default: None)
  • This should be one of the brick ports: PORT_1, PORT_2, PORT_3, or PORT_4.
~nxt_robot/desired_frequency (double, default: None)
  • The desired update frequency for the sensor.
~nxt_robot/name (string, default: None)
  • The topic name for the sensor data.
~nxt_robot/frame_id (string, default: None)
  • The frame that the sensor data is published in.

Intensity Sensor

ROS API for the intensity sensor

Published Topics

~<name> (nxt_msgs/Intensity)
  • Intensity value measured from the intensity sensor.

Parameters

~nxt_robot/type (string, default: None)
  • The type should be set to "intensity".
~nxt_robot/port (string, default: None)
  • This should be one of the brick ports: PORT_1, PORT_2, PORT_3, or PORT_4.
~nxt_robot/desired_frequency (double, default: None)
  • The desired update frequency for the sensor.
~nxt_robot/name (string, default: None)
  • The topic name for the sensor data.
~nxt_robot/frame_id (string, default: None)
  • The frame that the sensor data is published in.

Wiki: nxt_ros (last edited 2010-10-14 00:15:13 by KenConley)