Menu

HowToRunTheTeleopApp

vincent
Attachments
emergency_remote.jpg (631365 bytes)

On the workstation (if not otherwise specified, refer to the PC which we use to communicate with the the Robucar through ethernet), open up a new terminal by pressing CTRL+ALT+T, connect to the onboard PC on robucar(referred to as onboard PC thereafter):

$ ssh robucar

start the ROS system services by running roscore:

$ roscore

We need to change the mode of the low-level control board (referred to as control board thereafter) to allow it to take control commands from the onboard PC. See page 7 of the Robucar user manual for the description of different modes. To do that, we start another terminal,

$ ssh robucar
$ cd ~/Downloads/driver_usb1208/libhid
$ ./test-usb1208-b0

set B0=1 by typing 't', ENTER, '1', ENTER, '0' ENTER, 'e', ENTER in sequence.

Now the control board can be controlled by the onboard PC. To run the driver, we have to get enough system permission to access serial port /dev/ttyS0. And remember to release the emergency stop by pressing the button on the right on the yellow remote-control(shown in the green rectangle).
emergency_remote

$ sudo chmod a+rw /dev/ttyS0
$ roscd robucar_acm
$ ./robucar_driver.py

Connect the Joystick to the workstation via bluetooth by

$ sudo bash
$ rosrun ps3joy ps3joy.py

After pressing the pair button on the ps3 controller, we can see 'connection activated' shown on the command line.

On the workstation, build the robucar_acm package

$ rosmake robucar_acm
~~~~~~~

Set the environment variable ROS_MASTER_URI to point to robucar to allow communication between multiple machines on ROS.

~~~~~~~~~~
$ export ROS_MASTER_URI=http://acm-robucar:11311

Run the roslaunch file robucar_ps3joy_m.launch which runs multiple ROS nodes in sequence.

$ roscd robucar_acm
$ roslaunch robucar_ps3joy_m.launch

Now the robucar is ready to go. Control it by moving the left stick on the joystick and button X to stop.

Once you're done, use CTRL+C to terminal all the ROS nodes and then shutdown the PC on robuCar by

$ sudo shutdown -h now

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.