Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc Changes Based On f1tenth/f1tenth_system#4 #54

Closed
wants to merge 8 commits into from
Closed

Doc Changes Based On f1tenth/f1tenth_system#4 #54

wants to merge 8 commits into from

Conversation

JWhitleyWork
Copy link

This is the accompanying update to the documentation based on changes to the f1tenth_system repository defined in f1tenth/f1tenth_system#4. This MR also includes some minor formatting fixes.

Copy link
Member

@hzheng40 hzheng40 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small changes are needed.

#. Run ``catkin_make`` and source the directory using ``source devel/setup.bash``.
#. Run ``roslaunch f1tenth_racecar teleop.launch`` to launch the nodes for tele-operation.
* If you see a warning like this: ``[WARN] [1541708274.096842680]: Couldn't open joystick force feedback!``, it means that the joystick is connected.
#. Hold the LB button on the controller to start controlling the car. Move the left joystick up and down to move the car forward and backward and to the right and left to steer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are throttle and steering both on the same axis now? If it is, the old set up using the left joystick to throttle and right joystick to steer is better. If not, the wording needs to change.

If you are using a Hokuyo UST-10LX:

* In the file ``f1tenth_system/f1tenth_racecar/config/sensors.yaml``:
* Replace the line that starts with ``serial_port: `` with the text ``ip_address: "<sensor_ip>"`` replacing ``<sensor_ip>`` with the IP address of your sensor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'with the text' is also parsed into the code block when html is built.

If you are using a Hokuyo UTM-30LX:

* the F1TENTH software stack should already be configured to use the port ``/dev/sensors/hokuyo`` so no changes are needed if you are using this port.
* if you are using a different port, you will need to change the line that starts with ``serial_port: `` in ``f1tenth_system/f1tenth_racecar/config/sensors.yaml`` to point to the serial port to which your Hokuyo is connected.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'in' is also parsed into the code block when html is built.


1. Installing the VESC Tool
-----------------------------
We need to configure the VESC so that it works with the ROS driver package. Before you start, you'll need to install the `VESC Tool v2.03 <https://github.com/rpasichnyk/vesc_tool/releases/tag/v2.03>`_. The latest version, v2.05 does not contain the firmware that we use. The Linux VESC tool v2.03 can be found `here <https://drive.google.com/file/d/1tGrboseLUIlSdDjkhxDVxyopWc0h4_LC/view?usp=sharing>`_.
We need to configure the VESC so that it works with the ROS driver package. Before you start, you'll need to install the `VESC Tool v2.03 <https://github.com/rpasichnyk/vesc_tool/releases/tag/v2.03>`_. The latest version, v2.05 does not contain the firmware that we use. To download the version that we use, get the `Linux VESC tool v2.03 <https://drive.google.com/file/d/1tGrboseLUIlSdDjkhxDVxyopWc0h4_LC/view?usp=sharing>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page might need an update with the recent discoveries you've made in the firmware of the newer vescs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also might need to fix the links, i'm not sure why even the original is pointing to a fork.


#. The parameters in `vesc.yaml <https://github.com/f1tenth/f1tenth_system/blob/master/racecar/racecar/config/racecar-v2/vesc.yaml>`_ need to be calibrated.
#. The parameters in `vesc.yaml <https://github.com/f1tenth/f1tenth_system/blob/master/f1tenth_racecar/config/vesc.yaml>`_ need to be calibrated.

#. Follow this great `Tuning Guide <https://mushr.io/tutorials/tuning/>`_ that `Mushr <https://mushr.io/about/>`_ put together.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to write our own, but the mushr guide is the same method that we follow. They had gains negated in their guide (which is a bug it should NOT be negative), and files are in different directories.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is probably for a later PR

@@ -183,7 +183,7 @@ Install TEB:

.. code-block:: bash

$ sudo apt-get install ros-kinetic-teb-local-planner
$ sudo apt-get install ros-kinetic-teb-local-planner

TEB is a very thorough, well documented library with LOTS of parameters. Like over 40 parameters. We configured parameters in ``algorithms/path_planning/params/teb_local_planner_params.yaml``. There are params for ``min_turning_radius``, wheelbase of the car, ``max_vel_x``, and much more. In our ``follow_teb_local_plan.launch`` file, under the ``move_base`` node we add a rosparam that loads the ``teb_local_planner_params.yaml`` and have removed the default local planner params file. The underlying python file, ``follow_teb_local_plan.py``, is very similar to the ``follow_move_base_cmd_vel.py`` used for the default local planner. The main difference is that because Teb literally outputs the velocity and steering angle as is, we don’t need to do conversion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I believe) that this file is deprecated and only serve archival purpose.

#. Play the rosbag file using ``rosbag play <your rosbag file>``. While the bag is playing, examine the topics list, and you will see a list of all topics that were recorded into the bag. Note that in addition to the topics you specified, ROS will also record the ``rosout``, ``rosout_agg``, and ``clock`` topics, which can be useful for debugging.
#. View that recorded motor data by echoing the ``/vesc/sensors/core`` topic. Pay attention to how the motor RPM changed as you drove the car around. When the bag is out of data, it will stop publishing.
#. Play the rosbag file using ``rosbag play <your rosbag file>``. While the bag is playing, examine the topics list, and you will see a list of all topics that were recorded into the bag. Note that in addition to the topics you specified, ROS will also record the ``rosout``, ``rosout_agg``, and ``clock`` topics, which can be useful for debugging.
#. View that recorded motor data by echoing the ``/vesc/sensors/core`` topic. Pay attention to how the motor RPM changed as you drove the car around. When the bag is out of data, it will stop publishing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as waypoints.rst.

@hzheng40 hzheng40 closed this Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants