nxt_robots: nxt_robot_gyro_car | nxt_robot_kit_test | nxt_robot_sensor_car

Package Summary

The nxt_robot_sensor_car package provides a nxt robot with four sensors. For instructions on building the nxt robot load the sensor_car.lxf into the LEGO Digital Designer (ldd.lego.com) and select the building guide mode. This robot uses the nxt lego ultrasonic sensor, the nxt lego color sensor, the hitechnic gryo sensor, and the hitechnic acclerometer sensor.

sensor_car.png

Running the robot

After building the robot, make sure the sensors and servos are connected as listed in the robot.yaml file. http://nxt.foote-ros-pkg.googlecode.com/hg/nxt_robots/nxt_robot_sensor_car/robot.yaml

   1 nxt_robot:
   2   - type: motor
   3     name: r_wheel_joint
   4     port: PORT_A
   5     desired_frequency: 20.0
   6 
   7   - type: motor
   8     name: l_wheel_joint
   9     port: PORT_B
  10     desired_frequency: 20.0
  11 
  12   - type: motor
  13     name: m_wheel_joint
  14     port: PORT_C
  15     desired_frequency: 1.0
  16 
  17   - type: gyro
  18     name: gyro
  19     frame_id: gyro_link
  20     port: PORT_3
  21     offset: 0
  22     desired_frequency: 20.0
  23 
  24   - type: ultrasonic
  25     frame_id: ultrasonic_link
  26     name: ultrasonic_sensor
  27     port: PORT_2
  28     spread_angle: 0.2
  29     min_range: 0.01
  30     max_range: 2.5
  31     desired_frequency: 5.0
  32 
  33   - type: color
  34     frame_id: color_link
  35     name: color_sensor
  36     port: PORT_1
  37     desired_frequency: 10.0

Now you can start your base robot:

roslaunch nxt_robot_sensor_car robot.launch

To make sure everything is running fine, look at your node graph:

rxgraph

rxgraph_nxt_robot.png

Now try driving it around with nxt_teleop.

Wiki: nxt_robot_sensor_car (last edited 2010-08-19 00:58:31 by MeloneeWise)