Skip to content

Commit 961b5ab

Browse files
authored
v0.2.3 (#37)
1 parent 545ea8f commit 961b5ab

File tree

23 files changed

+205
-109
lines changed

23 files changed

+205
-109
lines changed

README.md

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ Please submit pull requests to the [devel branch](https://github.com/AutoRally/a
6161

6262
### 2. Clone or Fork Repositories
6363

64-
Get the autorally and imu_3dm_gx4 repositories in a [catkin workspace](http://wiki.ros.org/catkin/workspaces). The suggested location is `~/catkin_ws/src/`, but any valid catkin worskspace source folder will work. We suggest forking if you will be working with the code.
64+
Get the autorally repository in a [catkin workspace](http://wiki.ros.org/catkin/workspaces). The suggested location is `~/catkin_ws/src/`, but any valid catkin worskspace source folder will work. We suggest forking first if you will be working with the code.
6565

66-
To clone:
66+
To clone straight from the AutoRally:
6767

6868
git clone https://github.com/AutoRally/autorally.git
69-
git clone https://github.com/AutoRally/imu_3dm_gx4.git
7069

7170
### 3. Install AutoRally ROS Dependencies
7271

@@ -80,30 +79,69 @@ To compile and install run `catkin_make` from the catkin workspace folder.
8079

8180
Due to the additional requirement of ROS's distributed launch system, you must run
8281

83-
`source autorally/autorally_util/setupEnvLocal.sh`
82+
`source src/autorally/autorally_util/setupEnvLocal.sh`
8483

8584
before using any AutoRally components. See the [wiki](https://github.com/AutoRally/autorally/wiki) for more information about how to set this system up for distributed launches on your vehicle platform.
8685

8786
_Note:_ If you are unfamiliar with catkin, please know that you must run `source <catkin_ws>/devel/setup.sh` before ROS will be able to locate the autorally packages. This line can be added to your ~/.bashrc file.
8887

8988
### 5. Generate Documentation
9089

91-
You can generate / update code documentation by running `doxygen` in `autorally/`.
90+
You can generate or update code documentation by running `doxygen` in `autorally/`.
9291

9392
To view code documentation open `autorally/doc/html/index.html` in a web browser.
9493

95-
### 6. Test Setup in Simulation
94+
### 6. Start the AutoRally Simulation to Test Configuration
9695

97-
To test that your setup process was successful, run the AutoRally simulator with the following command. You can use a USB gamepad to drive the simulated platform around. On startup, the `runstop` message published by the joystick node is false. Press any of the buttons by the right stick (normally labelled X, Y, A, B or square, triangle, X, circle) to toggle the published value.
98-
99-
If you do not have a gamepad and want to control the platform autonomously in simulation, comment out the joystick node launch line in the simulation launch file so that it doesn't publish a `runstop` message that is always false.
100-
10196
```roslaunch autorally_gazebo autoRallyTrackGazeboSim.launch```
10297

98+
You can use a USB gamepad to drive the simulated platform around. On startup, the `runstop` message published by the `joystick` node is **false**. Press any of the buttons by the right stick (normally labelled X, Y, A, B or square, triangle, X, circle) to toggle the published value.
99+
100+
Verify runstop motion is enabled by looking at the `runstopMotionEnabled` paramter in the `/chassisState` topic.
101+
102+
If you aren't using a gamepad, you will have to configure another source of runstop information for the platform to move:
103+
104+
- Comment out line 93 of `autorally_gazebo/launch/autoRallyTrackGazeboSim.launch`
105+
106+
- ```rosrun rqt_publisher rqt_publisher```
107+
108+
and configure rqt_publisher to publish a message to topic `/runstop` of type `autorally_msgs/runstop` at 1 Hz with `sender` set to `rqt_publisher` and `motionEnabled` set to **true**.
109+
110+
- Verify that `runstopMotionEnabled` is **true** in `/chassisState` topic.
111+
112+
### 7. Autonomous Driving in Simulation
113+
114+
At the end of this section the robot will be driving autonomously in simulation using controllers available in `autorally_control`.
115+
116+
Position the robot in the same spot as when the simulation starts and make sure runstop motion should is enabled (set to **true**).
117+
118+
#### Start state estimator:
119+
120+
In `autorally_core/launch/state_estimator.launch` change `InvertY` and `InvertZ` to **false**, then:
121+
122+
rosparam set /gps_imu/FixedInitialPose true
123+
roslaunch autorally_core state_estimator.launch
124+
125+
#### Start waypoint follower:
126+
127+
roslaunch autorally_control waypointFollower.launch
128+
129+
#### Start constant speed controller and tell it what speed to drive:
130+
131+
roslaunch autorally_control constantSpeedController.launch
132+
rosrun rqt_publisher rqt_publisher
133+
134+
Configure a publisher on topic `constantSpeedController/speedCommand` of type `std_msgs/Float64` at rate 10 with value of 3 (you can adjust he value once everything is running). The value is the target velocity in m/s, and **as soon as you do this the platform should move if motion is enabled**.
135+
136+
If the robot turns and hits the barrier it's probably because the state estimator has not converged, so its orientation estimate is incorrect. Just select the track barriers and move them up to allow the robot to continue driving, and the estimator should converge and the vehicle will return to within the barriers.
137+
103138
## What's Next
104139

105-
Check out the [wiki](https://github.com/AutoRally/autorally/wiki) for:
106-
* Instructions to configure a physical AutoRally platform
107-
* Tutorials for released controllers (waypoint follower, constant speed controller)
108-
* Tutorial to use your own controller with the AutoRally platform
109-
* Information about how to run the included state estimator
140+
More detailed explanations of the controllers and state estimator can be found on the [wiki](https://github.com/AutoRally/autorally/wiki):
141+
* [State estimator](https://github.com/AutoRally/autorally/wiki/State%20Estimator)
142+
* [Waypoint follower](https://github.com/AutoRally/autorally/wiki/Waypoint%20Following)
143+
* [Constant speed controller](https://github.com/AutoRally/autorally/wiki/Constant%20Speed)
144+
145+
[Controlling the AutoRally platform](https://github.com/AutoRally/autorally/wiki/Controlling%20the%20AutoRally%20Platform) is a tutorial for how your own controller can control the AutoRally platform (in simulation or on hardware).
146+
147+
If you are configuring a physical AutoRally platform, the next step is to configure the compute box, all of the peripherals, and the launch system. Those instructions are found in the [Platform Configuration Instructions](https://github.com/AutoRally/autorally/wiki/Platform%20Configuration%20Instructions).

autorally/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717
<package>
1818
<name>autorally</name>
19-
<version>0.1.0</version>
19+
<version>0.2.3</version>
2020
<description>Autorally metapackage</description>
2121

2222
<author>Brian Goldfain</author>

autorally_control/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717
<package>
1818
<name>autorally_control</name>
19-
<version>0.1.0</version>
19+
<version>0.2.3</version>
2020
<description>All control software created for the autorally project resides here</description>
2121

2222
<maintainer email="bgoldfain3@gatech.edu">Brian Goldfain</maintainer>

autorally_core/launch/autorally.launch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<group if="$(optenv AR_CHASSIS_NEW true)">
1212
<include file="$(find autorally_core)/launch/autorally_chassis.launch" />
1313
</group>
14-
<group unless="$(optenv AR_CHASSIS_NEW false)">
14+
<group unless="$(optenv AR_CHASSIS_NEW true)">
1515
<include file="$(find autorally_core)/launch/arduinoOnboard.launch" />
1616
<include file="$(find autorally_core)/launch/servoInterface.launch" />
1717
</group>

autorally_core/launch/camera.launch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
<remap from="image_raw" to="$(arg side)_camera/image_raw" />
3434
<remap from="set_camera_info" to="$(arg side)_camera/set_camera_info"/>
35+
<remap from="image" to="$(arg side)_camera/image_diagnostic" />
3536
</node>
3637
<node pkg="nodelet" type="nodelet" name="$(arg side)_image_proc_debayer" args="load image_proc/debayer camera_nodelet_manager">
3738
<remap from="image_raw" to="$(arg side)_camera/image_raw" />

autorally_core/launch/servoInterface.launch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<rosparam param="servos" command="load" file="$(env AR_CONFIG_PATH)/arChassisConfig_$(env AR_CHASSIS).yaml" />
1212
<!-- <rosparam param="throttleCalibration" command="load" file="$(env AR_CONFIG_PATH)/throttlePositionCalibration.yaml" /> -->
1313

14-
<rosparam param="servoCommandProirities" command="load" file="$(env AR_CONFIG_PATH)/servoCommandPriorities.yaml" />
14+
<rosparam param="servoCommandProirities" command="load" file="$(env AR_CONFIG_PATH)/chassisCommandPriorities.yaml" />
1515
<!--configure settings for 57600 baud, 8N1 -->
1616
<param name="port" value="/dev/arServoController" />
1717
<param name="serialBaud" value="57600" />

autorally_core/launch/stateEstimator.launch

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
<param name="InvertX" value="false"/>
4545
<param name="InvertY" value="true"/>
4646
<param name="InvertZ" value="true"/>
47+
<param name="GPSX" value="-0.37"/>
48+
<param name="GPSY" value="0"/>
49+
<param name="GPSZ" value="-0.06"/>
4750

4851

4952
</node>

autorally_core/nodelet_plugins.xml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,31 @@
66
</class>
77
</library>
88

9-
<library path="lib/libServoInterface">
10-
<class name="autorally_core/ServoInterface" type="autorally_core::ServoInterface" base_class_type="nodelet::Nodelet">
9+
<library path="lib/libAutoRallyChassis">
10+
<class name="autorally_core/AutoRallyChassis" type="autorally_core::AutoRallyChassis" base_class_type="nodelet::Nodelet">
1111
<description>
12-
ServoInterface nodelet
12+
Interface nodelet for an AutoRally chassis
1313
</description>
1414
</class>
1515
</library>
1616

17-
<library path="lib/libAutoRallyChassis">
18-
<class name="autorally_core/AutoRallyChassis" type="autorally_core::AutoRallyChassis" base_class_type="nodelet::Nodelet">
19-
<desription>
20-
Interface nodelet for an AutoRally chassis
21-
</description>
17+
<library path="lib/libCameraAutoBalance">
18+
<class name="autorally_core/CameraAutoBalance" type="autorally_core::CameraAutoBalance" base_class_type="nodelet::Nodelet">
2219
</class>
2320
</library>
2421

2522
<library path="lib/libImageRepublisher">
2623
<class name="autorally_core/ImageRepublisher" type="autorally_core::ImageRepublisher" base_class_type="nodelet::Nodelet">
27-
<desription>
24+
<description>
2825
Image republisher for OCS display
2926
</description>
3027
</class>
3128
</library>
29+
30+
<library path="lib/libServoInterface">
31+
<class name="autorally_core/ServoInterface" type="autorally_core::ServoInterface" base_class_type="nodelet::Nodelet">
32+
<description>
33+
ServoInterface nodelet
34+
</description>
35+
</class>
36+
</library>

autorally_core/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717
<package>
1818
<name>autorally_core</name>
19-
<version>0.1.0</version>
19+
<version>0.2.3</version>
2020
<description>All core software (code specific to hardware on the robot) created for the autorally project resides here</description>
2121

2222
<maintainer email="bgoldfain3@gatech.edu">Brian Goldfain</maintainer>

autorally_core/src/StateEstimator/CMakeLists.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${Eigen_
55

66
find_package(GTSAM)
77
if(GTSAM_FOUND)
8-
include_directories(include
9-
${catkin_INCLUDE_DIRS}
10-
"/usr/local/include")
11-
add_executable(imuGpsEstimator IMU_GPS.cpp)
12-
target_link_libraries(imuGpsEstimator ${catkin_LIBRARIES} ${ROS_LIBRARIES} /usr/local/lib/libgtsam.so /usr/lib/libtbb.so /usr/lib/libtbbmalloc.so /usr/local/lib/libGeographic.so Diagnostics)
13-
install(TARGETS imuGpsEstimator
14-
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
15-
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
16-
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
8+
find_package(TBB)
9+
include_directories(include ${catkin_INCLUDE_DIRS} "/usr/local/include")
10+
11+
add_executable(imuGpsEstimator IMU_GPS.cpp)
12+
target_link_libraries(imuGpsEstimator ${catkin_LIBRARIES} ${ROS_LIBRARIES} /usr/local/lib/libgtsam.so /usr/local/lib/libGeographic.so ${TBB_LIBRARIES} Diagnostics)
13+
14+
install(TARGETS imuGpsEstimator
15+
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
16+
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
17+
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
1718
endif()

0 commit comments

Comments
 (0)