-
Notifications
You must be signed in to change notification settings - Fork 36
Focbox
Marian Kleineberg edited this page Mar 22, 2019
·
5 revisions
(Connected to power supply and USB?)
Note that in the launch files in our codebase, the vesc node is already started. If you use these, you don't need to follow the instructions below.
The focbox can be setup and adjusted via the VESC tool. To be able to use the steering servo, it is necessary to set SERVO_OUT_ENABLE to 1 in conf_general.h of the firmware. The easiest way is to flash a firmware, in which it is already enabled:
- Open the VESC tool
- Click on "Firmware" in the left column
- Select "Show non-default firmwares"
- Select VESC_servoout.bin
- Update firmware (click on the "Download"-Button next to the progress bar)
To control the car via a console window, follow these steps:
First terminal:
cd ~/catkin_ws/
-
catkin_make
(optional) -
source devel/setup.bash
(optional) cd src/vesc/
roslaunch vesc_driver vesc_driver_node.launch
Second terminal:
cd ~/catkin_ws/
-
rostopic list
(optional, to see all possible commands)
Now choose one of the possible commands, e.g.:
-
rostopic pub -r 20 /commands/servo/position -- std_msgs/Float64 1
(value between 0 and 1, 0.5 is "wheels straight") -
rostopic pub -r 20 /commands/motor/speed -- std_msgs/Float64 3000
(value is wheel rpm; value positive => positive speed; value positive => positive speed)
where -r 20
means, that the message is published with a frequency of 20 Hz.