diff --git a/racecar/racecar/LICENSE b/LICENSE similarity index 100% rename from racecar/racecar/LICENSE rename to LICENSE diff --git a/README.md b/README.md index 09452877..a8178a9e 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,9 @@ -# driver_base -You'll also need the driver_base package, , you could get this package via: - -```sudo apt-get install ros--driver-base``` - # f110_system -Code/Drivers onboard f110 race cars. - -## ackermann_msgs -The ROS message definitions for ackermann steering. - -## hokuyo_node -The driver for Hokuyo 10LX and Hokuyo 30LX. - -## joystick_drivers -The driver for Linux compatible joysticks - -## racecar -The package including launch files handling starting the car, and the parameters for Odometry tuning, motor/servo settings. - -## serial -A cross-platform library for interfacing with rs-232 serial like ports written in C++. +Code/Drivers onboard f1/10 racecars. -## vesc -The package handling communication with the VESC 6 Plus. +## f1tenth_racecar +The package including launch files handling starting the car, and the parameters for Odometry tuning, and motor/servo settings. +This package is based heavily on the [MIT Racecar](https://mit-racecar.github.io) project. ## waypoint_logger -The node that records the car's current position in the world, requires particle_filter to work. +The node that records the car's current position in the world. diff --git a/racecar/ackermann_cmd_mux/.cproject b/ackermann_cmd_mux/.cproject similarity index 100% rename from racecar/ackermann_cmd_mux/.cproject rename to ackermann_cmd_mux/.cproject diff --git a/racecar/ackermann_cmd_mux/.gitignore b/ackermann_cmd_mux/.gitignore similarity index 100% rename from racecar/ackermann_cmd_mux/.gitignore rename to ackermann_cmd_mux/.gitignore diff --git a/racecar/ackermann_cmd_mux/.project b/ackermann_cmd_mux/.project similarity index 100% rename from racecar/ackermann_cmd_mux/.project rename to ackermann_cmd_mux/.project diff --git a/racecar/ackermann_cmd_mux/.pydevproject b/ackermann_cmd_mux/.pydevproject similarity index 100% rename from racecar/ackermann_cmd_mux/.pydevproject rename to ackermann_cmd_mux/.pydevproject diff --git a/racecar/ackermann_cmd_mux/.settings/language.settings.xml b/ackermann_cmd_mux/.settings/language.settings.xml similarity index 100% rename from racecar/ackermann_cmd_mux/.settings/language.settings.xml rename to ackermann_cmd_mux/.settings/language.settings.xml diff --git a/racecar/ackermann_cmd_mux/CHANGELOG.rst b/ackermann_cmd_mux/CHANGELOG.rst similarity index 100% rename from racecar/ackermann_cmd_mux/CHANGELOG.rst rename to ackermann_cmd_mux/CHANGELOG.rst diff --git a/racecar/ackermann_cmd_mux/CMakeLists.txt b/ackermann_cmd_mux/CMakeLists.txt similarity index 64% rename from racecar/ackermann_cmd_mux/CMakeLists.txt rename to ackermann_cmd_mux/CMakeLists.txt index 04973476..02463bbe 100755 --- a/racecar/ackermann_cmd_mux/CMakeLists.txt +++ b/ackermann_cmd_mux/CMakeLists.txt @@ -1,13 +1,14 @@ cmake_minimum_required(VERSION 2.8.3) project(ackermann_cmd_mux) + find_package(catkin REQUIRED COMPONENTS - roscpp - pluginlib - nodelet - dynamic_reconfigure - ackermann_msgs - std_msgs - rospy + ackermann_msgs + dynamic_reconfigure + nodelet + pluginlib + roscpp + rospy + std_msgs ) # pkg-config support @@ -22,10 +23,10 @@ endif() generate_dynamic_reconfigure_options(cfg/reload.cfg) catkin_package( - INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME}_nodelet - CATKIN_DEPENDS roscpp pluginlib nodelet dynamic_reconfigure ackermann_msgs rospy std_msgs - DEPENDS yaml-cpp + INCLUDE_DIRS include + LIBRARIES ${PROJECT_NAME}_nodelet + CATKIN_DEPENDS roscpp pluginlib nodelet dynamic_reconfigure ackermann_msgs rospy std_msgs + DEPENDS yaml-cpp ) include_directories(include ${catkin_INCLUDE_DIRS} ${yaml-cpp_INCLUDE_DIRS}) @@ -38,17 +39,17 @@ add_dependencies(${PROJECT_NAME}_nodelet ${PROJECT_NAME}_gencfg) target_link_libraries(${PROJECT_NAME}_nodelet ${catkin_LIBRARIES} ${yaml-cpp_LIBRARIES}) install(TARGETS ${PROJECT_NAME}_nodelet - DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} ) install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} ) install(DIRECTORY plugins - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) install(DIRECTORY launch - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) install(DIRECTORY param - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) diff --git a/racecar/ackermann_cmd_mux/LICENSE b/ackermann_cmd_mux/LICENSE similarity index 100% rename from racecar/ackermann_cmd_mux/LICENSE rename to ackermann_cmd_mux/LICENSE diff --git a/racecar/ackermann_cmd_mux/cfg/reload.cfg b/ackermann_cmd_mux/cfg/reload.cfg similarity index 100% rename from racecar/ackermann_cmd_mux/cfg/reload.cfg rename to ackermann_cmd_mux/cfg/reload.cfg diff --git a/racecar/ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_mux_nodelet.hpp b/ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_mux_nodelet.hpp similarity index 100% rename from racecar/ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_mux_nodelet.hpp rename to ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_mux_nodelet.hpp diff --git a/racecar/ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_subscribers.hpp b/ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_subscribers.hpp similarity index 100% rename from racecar/ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_subscribers.hpp rename to ackermann_cmd_mux/include/ackermann_cmd_mux/ackermann_cmd_subscribers.hpp diff --git a/racecar/ackermann_cmd_mux/include/ackermann_cmd_mux/exceptions.hpp b/ackermann_cmd_mux/include/ackermann_cmd_mux/exceptions.hpp similarity index 100% rename from racecar/ackermann_cmd_mux/include/ackermann_cmd_mux/exceptions.hpp rename to ackermann_cmd_mux/include/ackermann_cmd_mux/exceptions.hpp diff --git a/racecar/ackermann_cmd_mux/launch/ackermann_cmd_mux.launch b/ackermann_cmd_mux/launch/ackermann_cmd_mux.launch similarity index 100% rename from racecar/ackermann_cmd_mux/launch/ackermann_cmd_mux.launch rename to ackermann_cmd_mux/launch/ackermann_cmd_mux.launch diff --git a/racecar/ackermann_cmd_mux/launch/reconfigure.launch b/ackermann_cmd_mux/launch/reconfigure.launch similarity index 100% rename from racecar/ackermann_cmd_mux/launch/reconfigure.launch rename to ackermann_cmd_mux/launch/reconfigure.launch diff --git a/racecar/ackermann_cmd_mux/launch/standalone.launch b/ackermann_cmd_mux/launch/standalone.launch similarity index 100% rename from racecar/ackermann_cmd_mux/launch/standalone.launch rename to ackermann_cmd_mux/launch/standalone.launch diff --git a/racecar/ackermann_cmd_mux/package.xml b/ackermann_cmd_mux/package.xml similarity index 63% rename from racecar/ackermann_cmd_mux/package.xml rename to ackermann_cmd_mux/package.xml index fca89687..2364ed1b 100755 --- a/racecar/ackermann_cmd_mux/package.xml +++ b/ackermann_cmd_mux/package.xml @@ -1,4 +1,6 @@ - + + + ackermann_cmd_mux 0.7.0 @@ -8,33 +10,24 @@ together with their priority and timeout are configured through a YAML file, that can be reload at runtime. Blatantly derived / copied from yujin_ocs/yocs_cmd_vel_mux. - Jorge Santos Simon - Michael Boulet Michael Boulet BSD http://ros.org/wiki/ackermann_cmd_mux https://github.mit.edu/racecar/racecar https://github.mit.edu/racecar/racecar/issues + Jorge Santos Simon + Michael Boulet catkin - roscpp - nodelet - dynamic_reconfigure - pluginlib - ackermann_msgs - yaml-cpp - rospy - std_msgs - - roscpp - ackermann_msgs - pluginlib - nodelet - dynamic_reconfigure - yaml-cpp - rospy - std_msgs + ackermann_msgs + dynamic_reconfigure + nodelet + pluginlib + roscpp + rospy + std_msgs + yaml-cpp diff --git a/racecar/ackermann_cmd_mux/param/example.yaml b/ackermann_cmd_mux/param/example.yaml similarity index 100% rename from racecar/ackermann_cmd_mux/param/example.yaml rename to ackermann_cmd_mux/param/example.yaml diff --git a/racecar/ackermann_cmd_mux/param/reconfigure.yaml b/ackermann_cmd_mux/param/reconfigure.yaml similarity index 100% rename from racecar/ackermann_cmd_mux/param/reconfigure.yaml rename to ackermann_cmd_mux/param/reconfigure.yaml diff --git a/racecar/ackermann_cmd_mux/plugins/nodelets.xml b/ackermann_cmd_mux/plugins/nodelets.xml similarity index 100% rename from racecar/ackermann_cmd_mux/plugins/nodelets.xml rename to ackermann_cmd_mux/plugins/nodelets.xml diff --git a/racecar/ackermann_cmd_mux/src/ackermann_cmd_mux_nodelet.cpp b/ackermann_cmd_mux/src/ackermann_cmd_mux_nodelet.cpp similarity index 100% rename from racecar/ackermann_cmd_mux/src/ackermann_cmd_mux_nodelet.cpp rename to ackermann_cmd_mux/src/ackermann_cmd_mux_nodelet.cpp diff --git a/racecar/ackermann_cmd_mux/src/ackermann_cmd_subscribers.cpp b/ackermann_cmd_mux/src/ackermann_cmd_subscribers.cpp similarity index 100% rename from racecar/ackermann_cmd_mux/src/ackermann_cmd_subscribers.cpp rename to ackermann_cmd_mux/src/ackermann_cmd_subscribers.cpp diff --git a/racecar/ackermann_cmd_mux/src/throttle_interpolator.py b/ackermann_cmd_mux/src/throttle_interpolator.py similarity index 100% rename from racecar/ackermann_cmd_mux/src/throttle_interpolator.py rename to ackermann_cmd_mux/src/throttle_interpolator.py diff --git a/ackermann_msgs/.gitignore b/ackermann_msgs/.gitignore deleted file mode 100755 index 1374a192..00000000 --- a/ackermann_msgs/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -*.a -*.o -*.os -*.pyc -*.so -*.tar.gz -*~ -TAGS -build/ -msg_gen/ -src/ - diff --git a/ackermann_msgs/CHANGELOG.rst b/ackermann_msgs/CHANGELOG.rst deleted file mode 100755 index f2dec57c..00000000 --- a/ackermann_msgs/CHANGELOG.rst +++ /dev/null @@ -1,28 +0,0 @@ -Change history -============== - -1.0.1 (2015-12-22) ------------------- -* Removed Jim Rothrock from the maintainer list. Changed the version to 1.0.1. - -1.0.0 (2015-08-28) ------------------- -* Changed the version to 1.0.0. - -0.9.1 (2014-04-30) ------------------- -* Export architecture_independent flag in package.xml (`#3 - `_), thanks - to Scott K Logan - -0.9.0 (2013-03-17) ------------------- - - * convert to catkin - * release to Hydro - -0.4.0 (2012-03-01) ------------------- - - * initial release to both Fuerte and Electric following API review - * later released with Groovy diff --git a/ackermann_msgs/CMakeLists.txt b/ackermann_msgs/CMakeLists.txt deleted file mode 100755 index defc5e0c..00000000 --- a/ackermann_msgs/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(ackermann_msgs) - -find_package(catkin REQUIRED COMPONENTS message_generation std_msgs) -# We want boost/format.hpp, which isn't in its own component. -find_package(Boost REQUIRED) - -add_message_files( - DIRECTORY msg - FILES AckermannDrive.msg AckermannDriveStamped.msg) - -generate_messages(DEPENDENCIES std_msgs) - -catkin_package( - CATKIN_DEPENDS message_runtime std_msgs - DEPENDS Boost) diff --git a/ackermann_msgs/README.rst b/ackermann_msgs/README.rst deleted file mode 100755 index 608dbcb7..00000000 --- a/ackermann_msgs/README.rst +++ /dev/null @@ -1,10 +0,0 @@ -ackermann_msgs -============== - -ROS messages for vehicles using front-wheel `Ackermann steering`_. It -was defined by the ROS `Ackermann steering group`_. - -ROS documentation: http://www.ros.org/wiki/ackermann_msgs - -.. _Ackermann steering: http://en.wikipedia.org/wiki/Ackermann_steering_geometry -.. _Ackermann steering group: http://www.ros.org/wiki/Ackermann%20Group diff --git a/ackermann_msgs/mainpage.dox b/ackermann_msgs/mainpage.dox deleted file mode 100755 index 38ce573b..00000000 --- a/ackermann_msgs/mainpage.dox +++ /dev/null @@ -1,9 +0,0 @@ -/** -\mainpage -\htmlinclude manifest.html - -Messages for driving a vehicle using Ackermann steering. - -There are no nodes, scripts or other APIs in this package. - -*/ diff --git a/ackermann_msgs/msg/AckermannDrive.msg b/ackermann_msgs/msg/AckermannDrive.msg deleted file mode 100755 index 2ee2939b..00000000 --- a/ackermann_msgs/msg/AckermannDrive.msg +++ /dev/null @@ -1,38 +0,0 @@ -## Driving command for a car-like vehicle using Ackermann steering. -# $Id$ - -# Assumes Ackermann front-wheel steering. The left and right front -# wheels are generally at different angles. To simplify, the commanded -# angle corresponds to the yaw of a virtual wheel located at the -# center of the front axle, like on a tricycle. Positive yaw is to -# the left. (This is *not* the angle of the steering wheel inside the -# passenger compartment.) -# -# Zero steering angle velocity means change the steering angle as -# quickly as possible. Positive velocity indicates a desired absolute -# rate of change either left or right. The controller tries not to -# exceed this limit in either direction, but sometimes it might. -# -float32 steering_angle # desired virtual angle (radians) -float32 steering_angle_velocity # desired rate of change (radians/s) - -# Drive at requested speed, acceleration and jerk (the 1st, 2nd and -# 3rd derivatives of position). All are measured at the vehicle's -# center of rotation, typically the center of the rear axle. The -# controller tries not to exceed these limits in either direction, but -# sometimes it might. -# -# Speed is the desired scalar magnitude of the velocity vector. -# Direction is forward unless the sign is negative, indicating reverse. -# -# Zero acceleration means change speed as quickly as -# possible. Positive acceleration indicates a desired absolute -# magnitude; that includes deceleration. -# -# Zero jerk means change acceleration as quickly as possible. Positive -# jerk indicates a desired absolute rate of acceleration change in -# either direction (increasing or decreasing). -# -float32 speed # desired forward speed (m/s) -float32 acceleration # desired acceleration (m/s^2) -float32 jerk # desired jerk (m/s^3) diff --git a/ackermann_msgs/msg/AckermannDriveStamped.msg b/ackermann_msgs/msg/AckermannDriveStamped.msg deleted file mode 100755 index 4790b641..00000000 --- a/ackermann_msgs/msg/AckermannDriveStamped.msg +++ /dev/null @@ -1,5 +0,0 @@ -## Time stamped drive command for robots with Ackermann steering. -# $Id$ - -Header header -AckermannDrive drive diff --git a/ackermann_msgs/package.xml b/ackermann_msgs/package.xml deleted file mode 100755 index 9c93e30a..00000000 --- a/ackermann_msgs/package.xml +++ /dev/null @@ -1,26 +0,0 @@ - - ackermann_msgs - 1.0.1 - - ROS messages for robots using Ackermann steering. - - Jack O'Quin - Jack O'Quin - BSD - - http://ros.org/wiki/ackermann_msgs - https://github.com/ros-drivers/ackermann_msgs.git - https://github.com/ros-drivers/ackermann_msgs/issues - - catkin - - message_generation - std_msgs - - message_runtime - std_msgs - - - - - diff --git a/f1tenth_racecar/CMakeLists.txt b/f1tenth_racecar/CMakeLists.txt new file mode 100644 index 00000000..77b9ffe2 --- /dev/null +++ b/f1tenth_racecar/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.0.2) +project(f1tenth_racecar) + +find_package(catkin REQUIRED + actionlib + rospy + rosservice + rostopic + sensor_msgs +) + +catkin_package( + CATKIN_DEPENDS + ackermann_cmd_mux + joy + rosbag + rostopic + rviz + tf2_ros + tf + urg_node +) + +install(PROGRAMS + scripts/joy_teleop.py + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) + +install(DIRECTORY config + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) + +install(DIRECTORY launch + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) + +install(DIRECTORY maps + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) + +install(DIRECTORY rviz + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/racecar/racecar/config/racecar-v2/high_level_mux.yaml b/f1tenth_racecar/config/high_level_mux.yaml similarity index 100% rename from racecar/racecar/config/racecar-v2/high_level_mux.yaml rename to f1tenth_racecar/config/high_level_mux.yaml diff --git a/racecar/racecar/config/racecar-v2/joy_teleop.yaml b/f1tenth_racecar/config/joy_teleop.yaml similarity index 100% rename from racecar/racecar/config/racecar-v2/joy_teleop.yaml rename to f1tenth_racecar/config/joy_teleop.yaml diff --git a/f1tenth_racecar/config/joy_teleop_nx.yaml b/f1tenth_racecar/config/joy_teleop_nx.yaml new file mode 100644 index 00000000..c99b4e6d --- /dev/null +++ b/f1tenth_racecar/config/joy_teleop_nx.yaml @@ -0,0 +1,51 @@ +joy_node: + dev: /dev/input/joypad-f710 + deadzone: 0.01 + autorepeat_rate: 20 + coalesce_interval: 0.01 + +teleop: + # Default mode - Stop for safety + default: + type: topic + is_default: true + message_type: ackermann_msgs/AckermannDriveStamped + topic_name: low_level/ackermann_cmd_mux/input/teleop + message_value: + - + target: drive.speed + value: 0.0 + - + target: drive.steering_angle + value: 0.0 + + # Enable Human control by holding Left Bumper + human_control: + type: topic + message_type: ackermann_msgs/AckermannDriveStamped + topic_name: low_level/ackermann_cmd_mux/input/teleop + deadman_buttons: [4] + axis_mappings: + - + axis: 1 + target: drive.speed + scale: 5.0 # joystick will command plus or minus 2 meters / second + offset: 0.0 + - + axis: 0 + target: drive.steering_angle + scale: 0.34 # joystick will command plus or minus ~20 degrees steering angle + offset: 0.0 + + # Enable autonomous control by pressing right bumper + # This switch causes the joy_teleop to stop sending messages to input/teleop + # And send messages to /dev/null (an unused ROS topic) + autonomous_control: + type: topic + message_type: std_msgs/Int8 + topic_name: /dev/null + deadman_buttons: [5] + message_value: + - + target: data + value: 0 diff --git a/racecar/racecar/config/racecar-v2/low_level_mux.yaml b/f1tenth_racecar/config/low_level_mux.yaml similarity index 100% rename from racecar/racecar/config/racecar-v2/low_level_mux.yaml rename to f1tenth_racecar/config/low_level_mux.yaml diff --git a/racecar/racecar/config/racecar-v2/vesc.yaml b/f1tenth_racecar/config/vesc.yaml similarity index 100% rename from racecar/racecar/config/racecar-v2/vesc.yaml rename to f1tenth_racecar/config/vesc.yaml diff --git a/f1tenth_racecar/launch/includes/common/joy_teleop.launch.xml b/f1tenth_racecar/launch/includes/common/joy_teleop.launch.xml new file mode 100644 index 00000000..d240de88 --- /dev/null +++ b/f1tenth_racecar/launch/includes/common/joy_teleop.launch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/f1tenth_racecar/launch/includes/common/sensors.launch.xml b/f1tenth_racecar/launch/includes/common/sensors.launch.xml new file mode 100644 index 00000000..0b4fa105 --- /dev/null +++ b/f1tenth_racecar/launch/includes/common/sensors.launch.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/f1tenth_racecar/launch/includes/static_transforms.launch.xml b/f1tenth_racecar/launch/includes/static_transforms.launch.xml new file mode 100644 index 00000000..bda0ccff --- /dev/null +++ b/f1tenth_racecar/launch/includes/static_transforms.launch.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/racecar/racecar/launch/includes/racecar-v2/vesc.launch.xml b/f1tenth_racecar/launch/includes/vesc.launch.xml similarity index 85% rename from racecar/racecar/launch/includes/racecar-v2/vesc.launch.xml rename to f1tenth_racecar/launch/includes/vesc.launch.xml index 56582264..dbf4f735 100644 --- a/racecar/racecar/launch/includes/racecar-v2/vesc.launch.xml +++ b/f1tenth_racecar/launch/includes/vesc.launch.xml @@ -1,8 +1,6 @@ - + - - - + @@ -17,5 +15,4 @@ - diff --git a/racecar/racecar/launch/mux.launch b/f1tenth_racecar/launch/mux.launch similarity index 66% rename from racecar/racecar/launch/mux.launch rename to f1tenth_racecar/launch/mux.launch index 48e66625..2c634269 100644 --- a/racecar/racecar/launch/mux.launch +++ b/f1tenth_racecar/launch/mux.launch @@ -1,4 +1,4 @@ - + - - - - + args="/vesc/high_level/ackermann_cmd_mux/output /vesc/low_level/ackermann_cmd_mux/input/navigation" /> + args="/vesc/ackermann_cmd_mux/input/safety /vesc/low_level/ackermann_cmd_mux/input/safety" /> + args="/vesc/ackermann_cmd_mux/input/teleop /vesc/low_level/ackermann_cmd_mux/input/teleop" /> - + args="/vesc/ackermann_cmd_mux/input/navigation /vesc/high_level/ackermann_cmd_mux/input/nav_0" /> + - + - + - + - diff --git a/f1tenth_racecar/launch/teleop.launch b/f1tenth_racecar/launch/teleop.launch new file mode 100644 index 00000000..6cff4504 --- /dev/null +++ b/f1tenth_racecar/launch/teleop.launch @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/racecar/racecar/maps/32380.pgm b/f1tenth_racecar/maps/32380.pgm similarity index 100% rename from racecar/racecar/maps/32380.pgm rename to f1tenth_racecar/maps/32380.pgm diff --git a/racecar/racecar/maps/32380.yaml b/f1tenth_racecar/maps/32380.yaml similarity index 100% rename from racecar/racecar/maps/32380.yaml rename to f1tenth_racecar/maps/32380.yaml diff --git a/racecar/racecar/maps/basement_hallways_10cm.png b/f1tenth_racecar/maps/basement_hallways_10cm.png similarity index 100% rename from racecar/racecar/maps/basement_hallways_10cm.png rename to f1tenth_racecar/maps/basement_hallways_10cm.png diff --git a/racecar/racecar/maps/basement_hallways_10cm.yaml b/f1tenth_racecar/maps/basement_hallways_10cm.yaml similarity index 100% rename from racecar/racecar/maps/basement_hallways_10cm.yaml rename to f1tenth_racecar/maps/basement_hallways_10cm.yaml diff --git a/racecar/racecar/maps/basement_hallways_5cm.png b/f1tenth_racecar/maps/basement_hallways_5cm.png similarity index 100% rename from racecar/racecar/maps/basement_hallways_5cm.png rename to f1tenth_racecar/maps/basement_hallways_5cm.png diff --git a/racecar/racecar/maps/basement_hallways_5cm.yml b/f1tenth_racecar/maps/basement_hallways_5cm.yml similarity index 100% rename from racecar/racecar/maps/basement_hallways_5cm.yml rename to f1tenth_racecar/maps/basement_hallways_5cm.yml diff --git a/racecar/racecar/maps/short-course-33.png b/f1tenth_racecar/maps/short-course-33.png similarity index 100% rename from racecar/racecar/maps/short-course-33.png rename to f1tenth_racecar/maps/short-course-33.png diff --git a/racecar/racecar/maps/short-course-33.yml b/f1tenth_racecar/maps/short-course-33.yml similarity index 100% rename from racecar/racecar/maps/short-course-33.yml rename to f1tenth_racecar/maps/short-course-33.yml diff --git a/f1tenth_racecar/package.xml b/f1tenth_racecar/package.xml new file mode 100644 index 00000000..b745f5ea --- /dev/null +++ b/f1tenth_racecar/package.xml @@ -0,0 +1,31 @@ + + + + f1tenth_racecar + 0.0.0 + The f1tenth_racecar package + Josh Whitley + BSD + http://github.com/f1tenth/f1tenth_system/issues + http://github.com/f1tenth/f1tenth_system + Josh Whitley + Michael Boulet + + catkin + + actionlib + rospy + rosservice + rostopic + sensor_msgs + + ackermann_cmd_mux + joy + rosbag + rviz + tf2_ros + tf + urg_node + vesc_ackermann + vesc_driver + diff --git a/racecar/racecar/rviz/known_map_localization.rviz b/f1tenth_racecar/rviz/known_map_localization.rviz similarity index 100% rename from racecar/racecar/rviz/known_map_localization.rviz rename to f1tenth_racecar/rviz/known_map_localization.rviz diff --git a/racecar/racecar/rviz/laser_scan_matcher.rviz b/f1tenth_racecar/rviz/laser_scan_matcher.rviz similarity index 100% rename from racecar/racecar/rviz/laser_scan_matcher.rviz rename to f1tenth_racecar/rviz/laser_scan_matcher.rviz diff --git a/racecar/racecar/rviz/mapping.rviz b/f1tenth_racecar/rviz/mapping.rviz similarity index 100% rename from racecar/racecar/rviz/mapping.rviz rename to f1tenth_racecar/rviz/mapping.rviz diff --git a/racecar/racecar/scripts/joy_teleop.py b/f1tenth_racecar/scripts/joy_teleop.py similarity index 100% rename from racecar/racecar/scripts/joy_teleop.py rename to f1tenth_racecar/scripts/joy_teleop.py diff --git a/hokuyo_node/CHANGELOG.rst b/hokuyo_node/CHANGELOG.rst deleted file mode 100644 index 3964819a..00000000 --- a/hokuyo_node/CHANGELOG.rst +++ /dev/null @@ -1,90 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package hokuyo_node -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -1.7.8 (2014-01-15) ------------------- -* Merge pull request `#8 `_ from trainman419/hydro-devel - Use rosconsole to set logger levels. Fixes `#7 `_ -* Use rosconsole to set logger levels. Fixes `#7 `_ -* Added changelog -* Contributors: Chad Rockey, chadrockey, trainman419 - -1.7.7 (2013-07-17) ------------------- -* fixing value interpretation for smaller lasers (04LX) - -1.7.6 (2013-04-25) ------------------- -* Removed REP 117 Tick/Tock for Hydro. - -1.7.5 (2013-03-26) ------------------- -* Added install targets for various files. -* Added install targets. -* Fixed two compile errors on OS X with clang -* Fixed dynamic_reconfigure build bug and refactor -* Missing include file. -* Catkinizing -* Tock on REP 117. Will now default to True. Warns if not set or false. -* Had to actually add boost directors and link to boost::thread in the CMakeLists -* Removed call to directory with no CMakeLists.txt -* explicitly link log4cxx -* Updated hokuyo node to add the use_rep_117 parameter and output error cases accordingly. -* Added a launch file to help test whether hokuyo unplug causes SIGHUP. -* Now only polls when there is no buffered data. Otherwise could lock up. Now only checks timeout once in read loop. Now detects EOF. Verified that no sighup on unplug. Now just need to test on Mac. Should fix `#3826 `_. -* Tweaked the tty settings to try to get hokuyo_node working on Mac. Seems to be working. Now need to test that I haven't broken anything. -* Now IO to hokuyo is purely file descriptor based. Should help with `#3826 `_. -* Changed open with fopen in the hokuyo library. This allow the NO_CTTY and O_NONBLOCK flags to be set at open time, which simplifies the code a bit. Still need to verify that CTTY actually works. -* Added Ubuntu platform tags to manifest -* Fixed linker export in manifest. -* Now blocks SIGHUP if there isn't a handler for it. -* Updated warning message when angular range is being limited for safety to give more data on why the problem is happening. -* Increased the max_safe_angular_range for 1.16.01 firmware. -* Correcting console output in getFirmwareVersion -* Added error code to diagnostic summary message as requested by `#3705 `_. -* Added getFirmwareVersion tool. -* Improved angle limiting on 30LX so that any sufficiently limited angular rance will work. Also reduced the range to 95 degrees/cluster, because that's what it takes to get good data. -* Made the allow_unsafe_settings warning message appear at more appropriate times. -* Added an allow_unsafe_settings option to bypass the UTM-30LX angular range limits. -* Added detection of 30LX, and automatic angle limiting in that case to prevent laser crashes. -* Added optional logging of hokuyo transactions. Have a small test that crashes the laser. -* Had add algorithm include in wrong place. -* Added missing include of algorithm -* Replaced the time calibration method. The new one is much faster, and much less sensitive to the massive clock error on the new hokuyo firmware. Added a test program that can be used for exploring hokuyo timing issues. -* Added code to detect the new hokuyo firmware version, and use a hard-coded latency for it. Now calls calibration code each time the device_id changes, instead of only once at startup. -* Made some more methods public so that other programs can do relatively low-level access. -* Added queryVersionInformation method to allow the version information to be explicitely reread at a time later than the open call. -* Fixed typo in previous commit. -* Made hokuyo export libhokuyo. Enhances external API (but it is an experimental API). -* Added ability to clear the latency set by calcLatency. Added currently used latency and time offset to diagnostics. -* Added time_offset parameter to allow tweaking of time offset. -* Took out compile twice hack -* preparing laser_drivers 1.0.0. Updated manifest descriptions slightly -* Changed diagnostic level messages. -* Previous fix to clear_window was broken. Moved to postOpenHook instead. -* Moved clear_window for frequency diagnostics to doStart so that the diagnostics get reset on any start event. (Was only in reconfigure events.) -* Tweaked a message. (Calibration will take up to a minute.) -* Cleaned up messages. Now says when it has started streaming. Made reads non-blocking to avoid lockup if concurrent access to the port happens. Added workaround for limited precision with which parameters are stored on the parameter server. Merged Connection Status diagnostic into Driver Status diagnostic. -* Added TODO list of tests -* Made turning off laser more robust. Previously there were errors if the turn off command happened just as a scan was arriving. -* Rearranged stop message to be after the scanning actually stops. -* Now only checks angle ranges and intensity support during config_update in the open state. Checking those in the running state was wreaking havoc, as it should. -* Got rid of all output to stderr when getID is in quiet mode. -* Made the serial number scheme compatible with how it used to be (always H in front), but compatible with long serial numbers (don't start with H when returned by device). -* Made getID retry a few times as the hokuyo takes a while before it can be talked to after it is plugged in. -* Made exceptions during startup TM2 command be ignored. Indeed, if the laser is scanning then TM2 fails, but the subsequent command successfully resets the state. Made the subsequent RS instead of QT as it does a more thorough reset. -* Increased limit on hokuyo exception messages. -* Added detection of intensity capability. Node now automatically sets intensity to false if it is unsupported. -* hokuyo_node now reports firmware version, vendor name, product name and firmware version in diagnostics. (Requested by `#3505 `_) -* Added graceful handling of out-of-range scan range. -* Made hokuyo range go from -pi to pi again because different hokuyos have different ranges, and we can't hard-code some particular range. -* Took race condition out of port locking, and removed unnecessary unlock before close. -* Tweaked package description. Added a debug message. -* Updated licenses. -* Fixed up example launch files. -* Reworked messages so that the driver should never spew when it is failing to reconnect. -* Removed no longer necessary tf stuff from hokuyo example launch file. -* Removed one unnecessary startup message. -* Took node documentation out of doxygen. -* staging laser_drivers into tick-tock diff --git a/hokuyo_node/CMakeLists.txt b/hokuyo_node/CMakeLists.txt deleted file mode 100644 index ea3f8474..00000000 --- a/hokuyo_node/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(hokuyo_node) - -find_package(Boost REQUIRED COMPONENTS system thread) - -# Utilities that use log4cxx - getID and getFirmwareVersion -find_library(LOG4CXX_LIBRARY log4cxx) -if(NOT LOG4CXX_LIBRARY) - message(FATAL_ERROR "Couldn't find log4cxx library") -endif() - -# Load catkin and all dependencies required for this package -find_package(catkin REQUIRED - COMPONENTS - diagnostic_updater - driver_base - dynamic_reconfigure - rosconsole - roscpp - self_test - sensor_msgs -) - -include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) -include_directories(include ${catkin_INCLUDE_DIRS}) - -# Dynamic reconfigure support -generate_dynamic_reconfigure_options(cfg/Hokuyo.cfg) - -# Export with catkin_package -catkin_package( - INCLUDE_DIRS include - CATKIN_DEPENDS rosconsole - LIBRARIES libhokuyo -) - -# Hokuyo library -add_library(libhokuyo src/hokuyo.cpp) -target_link_libraries(libhokuyo ${rosconsole_LIBRARIES}) - -# hokuyo_node -add_executable(hokuyo_node src/hokuyo_node.cpp) -add_dependencies(hokuyo_node ${PROJECT_NAME}_gencfg) -target_link_libraries(hokuyo_node - libhokuyo - ${Boost_LIBRARIES} - ${catkin_LIBRARIES} -) - -add_executable(getID src/getID.cpp) -target_link_libraries(getID libhokuyo ${LOG4CXX_LIBRARY} ${catkin_LIBRARIES}) - -add_executable(getFirmwareVersion src/getFirmwareVersion.cpp) -target_link_libraries(getFirmwareVersion - libhokuyo - ${LOG4CXX_LIBRARY} - ${catkin_LIBRARIES} -) - -# Install targets -install(TARGETS libhokuyo DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) - -install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -) - -install(TARGETS hokuyo_node getID getFirmwareVersion - DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) - -install(FILES test/TODO test/unplug_test.launch COPYING.lib hokuyo_test.launch hokuyo_test.vcg hokuyo_test_intensity.launch - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) \ No newline at end of file diff --git a/hokuyo_node/cfg/Hokuyo.cfg b/hokuyo_node/cfg/Hokuyo.cfg deleted file mode 100755 index b7c5c400..00000000 --- a/hokuyo_node/cfg/Hokuyo.cfg +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/bin/env python -#* All rights reserved. -#* -#* Redistribution and use in source and binary forms, with or without -#* modification, are permitted provided that the following conditions -#* are met: -#* -#* * Redistributions of source code must retain the above copyright -#* notice, this list of conditions and the following disclaimer. -#* * Redistributions in binary form must reproduce the above -#* copyright notice, this list of conditions and the following -#* disclaimer in the documentation and/or other materials provided -#* with the distribution. -#* * Neither the name of the Willow Garage nor the names of its -#* contributors may be used to endorse or promote products derived -#* from this software without specific prior written permission. -#* -#* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -#* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -#* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -#* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -#* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -#* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -#* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -#* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -#* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -#* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -#* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -#* POSSIBILITY OF SUCH DAMAGE. -#*********************************************************** - -# Author: Blaise Gassend - -PACKAGE='hokuyo_node' -from dynamic_reconfigure.parameter_generator_catkin import * - -from math import pi - -from driver_base.msg import SensorLevels - -gen = ParameterGenerator() -# Name Type Reconfiguration level Description Default Min Max -gen.add("min_ang", double_t, SensorLevels.RECONFIGURE_STOP, "The angle of the first range measurement. The unit depends on ~ang_radians.", -pi/2, -pi, pi) -gen.add("max_ang", double_t, SensorLevels.RECONFIGURE_STOP, "The angle of the first range measurement. The unit depends on ~ang_radians.", pi/2, -pi, pi) -gen.add("intensity", bool_t, SensorLevels.RECONFIGURE_STOP, "Whether or not the hokuyo returns intensity values.", False) -gen.add("cluster", int_t, SensorLevels.RECONFIGURE_STOP, "The number of adjacent range measurements to cluster into a single reading", 1, 0, 99) -gen.add("skip", int_t, SensorLevels.RECONFIGURE_STOP, "The number of scans to skip between each measured scan", 0, 0, 9) -gen.add("port", str_t, SensorLevels.RECONFIGURE_CLOSE, "The serial port where the hokuyo device can be found", "/dev/sensors/hokuyo") -gen.add("calibrate_time", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Whether the node should calibrate the hokuyo's time offset", True) -gen.add("frame_id", str_t, SensorLevels.RECONFIGURE_RUNNING, "The frame in which laser scans will be returned", "laser") -gen.add("time_offset", double_t, SensorLevels.RECONFIGURE_RUNNING, "An offet to add to the timestamp before publication of a scan", 0, -0.25, 0.25) -gen.add("allow_unsafe_settings",bool_t, SensorLevels.RECONFIGURE_CLOSE, "Turn this on if you wish to use the UTM-30LX with an unsafe angular range. Turning this option on may cause occasional crashes or bad data. This option is a tempory workaround that will hopefully be removed in an upcoming driver version.", False) - -exit(gen.generate(PACKAGE, "hokuyo_node", "Hokuyo")) diff --git a/hokuyo_node/hokuyo_test.launch b/hokuyo_node/hokuyo_test.launch deleted file mode 100644 index f923a251..00000000 --- a/hokuyo_node/hokuyo_test.launch +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/hokuyo_node/hokuyo_test.vcg b/hokuyo_node/hokuyo_test.vcg deleted file mode 100644 index fc2a47d3..00000000 --- a/hokuyo_node/hokuyo_test.vcg +++ /dev/null @@ -1,50 +0,0 @@ -Background\ ColorR=0 -Background\ ColorG=0 -Background\ ColorB=0 -Fixed\ Frame=/laser -Target\ Frame=/laser -Floor\ Scan.Alpha=1 -Floor\ Scan.Autocompute\ Intensity\ Bounds=1 -Floor\ Scan.Billboard\ Size=0.01 -Floor\ Scan.Channel=-1 -Floor\ Scan.Decay\ Time=0 -Floor\ Scan.Enabled=1 -Floor\ Scan.Max\ ColorR=0 -Floor\ Scan.Max\ ColorG=1 -Floor\ Scan.Max\ ColorB=0 -Floor\ Scan.Max\ Intensity=4096 -Floor\ Scan.Min\ ColorR=0 -Floor\ Scan.Min\ ColorG=0 -Floor\ Scan.Min\ ColorB=0 -Floor\ Scan.Min\ Intensity=0 -Floor\ Scan.Selectable=1 -Floor\ Scan.Style=1 -Floor\ Scan.Topic=/scan -Grid.Alpha=0.5 -Grid.Cell\ Size=1 -Grid.ColorR=0.5 -Grid.ColorG=0.5 -Grid.ColorB=0.5 -Grid.Enabled=1 -Grid.Line\ Style=0 -Grid.Line\ Width=0.03 -Grid.Normal\ Cell\ Count=0 -Grid.OffsetX=0 -Grid.OffsetY=0 -Grid.OffsetZ=0 -Grid.Plane=0 -Grid.Plane\ Cell\ Count=10 -Grid.Reference\ Frame= -Tool\ 2D\ Nav\ GoalTopic=goal -Tool\ 2D\ Pose\ EstimateTopic=initialpose -Camera\ Type=rviz::FixedOrientationOrthoViewController -Camera\ Config=121.003 -0.957785 11.3941 -0.649553 -0.707107 -0 -0 0.707107 -Property\ Grid\ State=selection=;expanded=.Global Options;scrollpos=0,0;splitterpos=125,266;ispageselected=1 -[Display0] -Name=Floor Scan -Package=rviz -ClassName=rviz::LaserScanDisplay -[Display1] -Name=Grid -Package=rviz -ClassName=rviz::GridDisplay diff --git a/hokuyo_node/hokuyo_test_intensity.launch b/hokuyo_node/hokuyo_test_intensity.launch deleted file mode 100644 index 89971fd4..00000000 --- a/hokuyo_node/hokuyo_test_intensity.launch +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/hokuyo_node/include/hokuyo_node/hokuyo.h b/hokuyo_node/include/hokuyo_node/hokuyo.h deleted file mode 100644 index 43e000ae..00000000 --- a/hokuyo_node/include/hokuyo_node/hokuyo.h +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Player - One Hell of a Robot Server - * Copyright (C) 2008-2010 Willow Garage - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -/* \mainpage hokuyo_node - * \htmlinclude manifest.html - */ - -#ifndef HOKUYO_HH -#define HOKUYO_HH - -#include -#include -#include -#include -#include -#include - -//! A namespace containing the hokuyo device driver -namespace hokuyo -{ - //! The maximum number of readings that can be returned from a hokuyo - const uint32_t MAX_READINGS = 1128; - - //! The maximum length a command will ever be - const int MAX_CMD_LEN = 100; - - //! The maximum number of bytes that should be skipped when looking for a response - const int MAX_SKIPPED = 1000000; - - //! Macro for defining an exception with a given parent (std::runtime_error should be top parent) -#define DEF_EXCEPTION(name, parent) \ - class name : public parent { \ - public: \ - name(const char* msg) : parent(msg) {} \ - }\ - - //! A standard Hokuyo exception - DEF_EXCEPTION(Exception, std::runtime_error); - - //! An exception for use when a timeout is exceeded - DEF_EXCEPTION(TimeoutException, Exception); - - //! An exception for use when data is corrupted - DEF_EXCEPTION(CorruptedDataException, Exception); - - //! An exception for use when the timestamp on the data is repeating (a good indicator something has gone wrong) - DEF_EXCEPTION(RepeatedTimeException, Exception); - -#undef DEF_EXCEPTION - - //! A struct for returning configuration from the Hokuyo - struct LaserConfig - { - //! Start angle for the laser scan [rad]. 0 is forward and angles are measured clockwise when viewing hokuyo from the top. - float min_angle; - //! Stop angle for the laser scan [rad]. 0 is forward and angles are measured clockwise when viewing hokuyo from the top. - float max_angle; - //! Scan resolution [rad]. - float ang_increment; - //! Scan resoltuion [s] - float time_increment; - //! Time between scans - float scan_time; - //! Minimum range [m] - float min_range; - //! Maximum range [m] - float max_range; - //! Range Resolution [m] - float range_res; - }; - - - //! A struct for returning laser readings from the Hokuyo - struct LaserScan - { - //! Array of ranges - std::vector ranges; - //! Array of intensities - std::vector intensities; - //! Self reported time stamp in nanoseconds - uint64_t self_time_stamp; - //! System time when first range was measured in nanoseconds - uint64_t system_time_stamp; - //! Configuration of scan - LaserConfig config; - }; - - - //! A class for interfacing to an SCIP2.0-compliant Hokuyo laser device - /*! - * Almost all methods of this class may throw an exception of type - * hokuyo::Exception in the event of an error when communicating - * with the device. This primarily include read/write problems - * (hokuyo::Exception), communication time-outs - * (hokuyo:TimeoutException), and corrupted data - * (hokuyo::CorruptedDataException). However, many methods which - * wrap commands that are sent to the hokuyo will return a - * hokuyo-supplied status code as well. These are not - * "exceptional," in that the device is operating correctly from a - * communication standpoint, although the return code may still - * indicate that the device has undergone some sort of failure. In - * these cases, return codes of 0 are normal operation. For more - * information on the possible device error codes, consult the - * hokuyo manual. - */ - class Laser - { - public: - //! Constructor - Laser(); - - //! Destructor - ~Laser(); - - //! Open the port - /*! - * This must be done before the hokuyo can be used. This call essentially - * wraps fopen, with some additional calls to tcsetattr. - * - * \param port_name A character array containing the name of the port - * - */ - void open(const char * port_name); - - //! Close the port - /*! - * This call essentiall wraps fclose. - */ - void close(); - - //! Reset the laser to its power on state. - /*! - * This calls TM2 and RS. Exceptions raised by TM2 are ignored as they - * are normal in the case where the laser is scanning. Exceptions - * raised by RS are passed back to the caller. - */ - void reset(); - - //! Check whether the port is open - bool portOpen() { return laser_fd_ != -1; } - - //! Sends an SCIP2.0 command to the hokuyo device - // sets up model 04LX to work in SCIP 2.0 mode - void setToSCIP2(); - - /*! - * This function allows commands to be sent directly to the hokuyo. - * Possible commands can be found in the hokuyo documentation. It - * will only read up until the end of the status code. Any - * additional bytes will be left on the line for parsing. - * - * \param cmd Command and arguments in a character array - * \param timeout Timeout in milliseconds. - * - * \return Status code returned from hokuyo device. - */ - int sendCmd(const char* cmd, int timeout = -1); - - //! Retrieve the native hokuyo configuration. - /*! - * This function will retrieve the native configuration for the laser. - * In particular, this specifies the smallest possible min, and largest - * possible maximum values that can be used. - * - * \param config A reference to the LaserConfig which will be populated - * - * \return Status code returned from hokuyo device. - */ - void getConfig(LaserConfig& config); - - - //! Retrieve a single scan from the hokuyo - /*! - * \param scan A reference to the LaserScan which will be populated - * \param min_ang Minimal angle of the scan - * \param max_ang Maximum angle of the scan - * \param clustering Number of adjascent ranges to be clustered into a single measurement. - * \param timeout Timeout in milliseconds. - * - * \return Status code returned from hokuyo device. - */ - int pollScan(LaserScan& scan, double min_ang, double max_ang, int clustering = 0, int timeout = -1); - - //! Request a sequence of scans from the hokuyo - /*! - * This function will request a sequence of scans from the hokuyo. If - * indefinite scans are requested, stop_scanning() must be called - * to terminate scanning. Service_scan() must be called repeatedly - * to receive scans as they come in. - * - * \param intensity Whether or not intensity data should be provided - * \param min_ang Minimal angle of the scan (radians) - * \param max_ang Maximum angle of the scan (radians) - * \param clustering Number of adjascent ranges to be clustered into a single measurement - * \param skip Number of scans to skip between returning measurements - * \param num Number of scans to return (0 for indefinite) - * \param timeout Timeout in milliseconds. - * - * \return Status code returned from hokuyo device. - */ - int requestScans(bool intensity, double min_ang, double max_ang, int clustering = 0, int skip = 0, int num = 0, int timeout = -1); - - //! Retrieve a scan if they have been requested - /*! - * \param scan A reference to the LaserScan which will be populated. - * \param timeout Timeout in milliseconds. - * - * \return 0 on succes, Status code returned from hokuyo device on failure. (Normally 99 is used for success) - */ - int serviceScan(LaserScan& scan, int timeout = -1); - - //! Turn the laser off - /*! - * \return Status code returned from hokuyo device. - */ - int laserOff(); - - //! Turn the laser on - /*! - * \return Status code returned from hokuyo device. - */ - int laserOn(); - - //! Stop retrieving scans - /*! - * \return Status code returned from hokuyo device. - */ - int stopScanning(); - - //! Return hokuyo serial number - /*! - * \return Serial number of hokuyo. - */ - std::string getID(); - - //! Get status message from the hokuyo - /*! - * \return Status message - */ - std::string getStatus(); - - //! Compute latency between actual hokuyo readings and system time - /*! - * This function will estimate the latency between when the data - * is actually acquired by the hokuyo and a read call returns from - * the hokuyo with the data. This latency is stored in an offset - * variable and applied to the measurement of system time which - * occurs immediately after a read. This means that the - * system_time_stamp variable on LaserScan struct is corrected - * and accurately reflects the exact time of the hokuyo data in - * computer system time. This function takes the same arguments - * as a call to request scans, since this latency may be - * parameter dependent. NOTE: This method will take - * approximately 10 seconds to return. - * - * \param intensity Whether or not intensity data should be provided - * \param min_ang Minimal angle of the scan (radians) - * \param max_ang Maximum angle of the scan (radians) - * \param clustering Number of adjascent ranges to be clustered into a single measurement - * \param skip Number of scans to skip between returning measurements - * \param num Number of times to repeat the measurement 0 for auto. - * \param timeout Timeout in milliseconds. - * - * \return Median latency in nanoseconds - */ - long long calcLatency(bool intensity, double min_ang, double max_ang, int clustering = 0, int skip = 0, int num = 0, int timeout = -1); - - //! This method clears the offset that was computed with calcLatency. - void clearLatency() - { - offset_ = 0; - } - - //! Returns the latency that is in use. - //! \return Latency in nanoseconds. - long long getLatency() - { - return offset_; - } - - //! Return firmware version - /*! - * \return Firmware version of hokuyo. - */ - std::string getFirmwareVersion(); - - //! Return hokuyo vendor name - /*! - * \return Vendor name of hokuyo. - */ - std::string getVendorName(); - - //! Return hokuyo product name - /*! - * \return Product name of hokuyo. - */ - std::string getProductName(); - - //! Return hokuyo protocol version - /*! - * \return Protocol version of hokuyo. - */ - std::string getProtocolVersion(); - - //! Tries to determine if intensity mode is supported - /*! - * \return True if intensity mode is supported, false if it is not. - * hokuyo::Exception if no scan could be read even out of intensity - * mode. - */ - bool isIntensitySupported(); - - //! Call VV and store the returned version information - //! Use other methods to read the information. - void queryVersionInformation(); - - //! Wrapper around fputs - int laserWrite(const char* msg); - - //! Read a full line from the hokuyo using fgets - int laserReadline(char *buf, int len, int timeout = -1); - - //! Wrapper around tcflush - int laserFlush(); - - //! Read in a time value - uint64_t readTime(int timeout = -1); - - private: - //! Use the TM command to determine the offset between the PC clock and - //the Hokuyo clock. Returns the median of reps measurements. - long long int getHokuyoClockOffset(int reps, int timeout = -1); - - //! Get reps scans and returns the median difference between the system - // timestamp (PC) and the scan timestamp (Hokuyo). - long long int getHokuyoScanStampToSystemStampOffset(bool intensity, double min_ang, double max_ang, int clustering, int skip, int reps, int timeout = -1); - - //! Query the sensor configuration of the hokuyo - void querySensorConfig(); - - //! Search for a particular sequence and then read the rest of the line - char* laserReadlineAfter(char *buf, int len, const char *str, int timeout = -1); - - //! Compute the checksum of a given buffer - bool checkSum(const char* buf, int buf_len); - - //! Read in a scan - void readData(LaserScan& scan, bool has_intensity, int timout = -1); - - int dmin_; - int dmax_; - int ares_; - int amin_; - int amax_; - int afrt_; - int rate_; - - int wrapped_; - - unsigned int last_time_; - - unsigned int time_repeat_count_; - - long long offset_; - - int laser_fd_; - - std::string vendor_name_; - std::string product_name_; - std::string serial_number_; - std::string protocol_version_; - std::string firmware_version_; - - char read_buf[256]; - int read_buf_start; - int read_buf_end; - }; - -} - -#endif diff --git a/hokuyo_node/package.xml b/hokuyo_node/package.xml deleted file mode 100644 index d01e2373..00000000 --- a/hokuyo_node/package.xml +++ /dev/null @@ -1,37 +0,0 @@ - - hokuyo_node - 1.7.8 - A ROS node to provide access to SCIP 2.0-compliant Hokuyo laser range finders (including 04LX). - Chad Rockey - - LGPL - - http://www.ros.org/wiki/hokuyo_node - https://github.com/ros-drivers/hokuyo_node/issues - https://github.com/ros-drivers/hokuyo_node - - Brian P. Gerkey - Jeremy Leibs - Blaise Gassend - - catkin - - rosconsole - roscpp - sensor_msgs - driver_base - self_test - diagnostic_updater - dynamic_reconfigure - log4cxx - - rosconsole - roscpp - sensor_msgs - driver_base - self_test - diagnostic_updater - dynamic_reconfigure - log4cxx - - diff --git a/hokuyo_node/src/CMakeLists.txt b/hokuyo_node/src/CMakeLists.txt deleted file mode 100644 index 1d7355fa..00000000 --- a/hokuyo_node/src/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -find_library(LOG4CXX_LIBRARY log4cxx) -if(NOT LOG4CXX_LIBRARY) - message(FATAL_ERROR "Couldn't find log4cxx library") -endif() - -rosbuild_add_executable(getID getID.cpp) -target_link_libraries(getID libhokuyo ${LOG4CXX_LIBRARY}) - -rosbuild_add_executable(getFirmwareVersion getFirmwareVersion.cpp) -target_link_libraries(getFirmwareVersion libhokuyo ${LOG4CXX_LIBRARY}) diff --git a/hokuyo_node/src/getFirmwareVersion.cpp b/hokuyo_node/src/getFirmwareVersion.cpp deleted file mode 100644 index 064ca7ac..00000000 --- a/hokuyo_node/src/getFirmwareVersion.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/********************************************************************* -* Software License Agreement (BSD License) -* -* Copyright (c) 2009, Willow Garage, Inc. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following -* disclaimer in the documentation and/or other materials provided -* with the distribution. -* * Neither the name of the Willow Garage nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -*********************************************************************/ - -#include "hokuyo_node/hokuyo.h" -#include -#include -#include - -using namespace std; - - -int -main(int argc, char** argv) -{ - if (argc < 2 || argc > 3) - { - fprintf(stderr, "usage: getFirmwareVersion /dev/ttyACM? [quiet]\nOutputs the firmware version of a hokuyo at /dev/ttyACM?. Add a second argument for script friendly output.\n"); - return 1; - } - - bool verbose = (argc == 2); - - if (!verbose) - { - // In quiet mode we want to turn off logging levels that go to stdout. - log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(ROSCONSOLE_DEFAULT_NAME); - logger->setLevel(ros::console::g_level_lookup[ros::console::levels::Error]); - ros::console::notifyLoggerLevelsChanged(); - } - - hokuyo::Laser laser; - - for (int retries = 10; retries; retries--) - { - try - { - laser.open(argv[1]); - std::string firmware_version = laser.getFirmwareVersion(); - if (verbose) - printf("Device at %s has FW rev ", argv[1]); - printf("%s\n", firmware_version.c_str()); - laser.close(); - return 0; - } - catch (hokuyo::Exception &e) - { - if (verbose) - ROS_WARN("getFirmwareVersion failed: %s", e.what()); - laser.close(); - } - sleep(1); - } - - if (verbose) - ROS_ERROR("getFirmwareVersion failed for 10 seconds. Giving up."); - return 1; -} diff --git a/hokuyo_node/src/getID.cpp b/hokuyo_node/src/getID.cpp deleted file mode 100644 index 7d4021fe..00000000 --- a/hokuyo_node/src/getID.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/********************************************************************* -* Software License Agreement (BSD License) -* -* Copyright (c) 2009, Willow Garage, Inc. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following -* disclaimer in the documentation and/or other materials provided -* with the distribution. -* * Neither the name of the Willow Garage nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -*********************************************************************/ - -#include "hokuyo_node/hokuyo.h" -#include -#include -#include - -using namespace std; - - -int -main(int argc, char** argv) -{ - if (argc < 2 || argc > 3) - { - fprintf(stderr, "usage: getID /dev/ttyACM? [quiet]\nOutputs the device ID of a hokuyo at /dev/ttyACM?. Add a second argument for script friendly output.\n"); - return 1; - } - - bool verbose = (argc == 2); - - if (!verbose) - { - // In quiet mode we want to turn off logging levels that go to stdout. - log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(ROSCONSOLE_DEFAULT_NAME); - logger->setLevel(ros::console::g_level_lookup[ros::console::levels::Error]); - ros::console::notifyLoggerLevelsChanged(); - } - - hokuyo::Laser laser; - - for (int retries = 10; retries; retries--) - { - try - { - laser.open(argv[1]); - std::string device_id = laser.getID(); - if (verbose) - printf("Device at %s has ID ", argv[1]); - printf("%s\n", device_id.c_str()); - laser.close(); - return 0; - } - catch (hokuyo::Exception &e) - { - if (verbose) - ROS_WARN("getID failed: %s", e.what()); - laser.close(); - } - sleep(1); - } - - if (verbose) - ROS_ERROR("getID failed for 10 seconds. Giving up."); - return 1; -} diff --git a/hokuyo_node/src/hokuyo.cpp b/hokuyo_node/src/hokuyo.cpp deleted file mode 100644 index 40890d26..00000000 --- a/hokuyo_node/src/hokuyo.cpp +++ /dev/null @@ -1,1172 +0,0 @@ -/* - * Player - One Hell of a Robot Server - * Copyright (C) 2008-2010 Willow Garage - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -#include -#include -#include -#include -#include -#include -#include - -#include "hokuyo_node/hokuyo.h" - -#include - -#include - -#include - -#include "ros/console.h" - -#if POSIX_TIMERS <= 0 -#include -#endif - - -//! Macro for throwing an exception with a message, passing args -#define HOKUYO_EXCEPT(except, msg, ...) \ - { \ - char __buf[1000]; \ - snprintf(__buf, 1000, msg " (in hokuyo::laser::%s) You may find further details at http://www.ros.org/wiki/hokuyo_node/Troubleshooting" , ##__VA_ARGS__, __FUNCTION__); \ - throw except(__buf); \ - } - - -//! Helper function for querying the system time -static uint64_t timeHelper() -{ -#if POSIX_TIMERS > 0 - struct timespec curtime; - clock_gettime(CLOCK_REALTIME, &curtime); - return (uint64_t)(curtime.tv_sec) * 1000000000 + (uint64_t)(curtime.tv_nsec); -#else - struct timeval timeofday; - gettimeofday(&timeofday,NULL); - return (uint64_t)(timeofday.tv_sec) * 1000000000 + (uint64_t)(timeofday.tv_usec) * 1000; -#endif -} - - -#ifdef USE_LOG_FILE -FILE *logfile; -#endif - -/////////////////////////////////////////////////////////////////////////////// -hokuyo::Laser::Laser() : - dmin_(0), dmax_(0), ares_(0), amin_(0), amax_(0), afrt_(0), rate_(0), - wrapped_(0), last_time_(0), time_repeat_count_(0), offset_(0), - laser_fd_(-1) -{ -#ifdef USE_LOG_FILE - if (!logfile) - logfile = fopen("hokuyo.log", "w"); -#endif -} - - -/////////////////////////////////////////////////////////////////////////////// -hokuyo::Laser::~Laser () -{ - if (portOpen()) - close(); -} - - -/////////////////////////////////////////////////////////////////////////////// -void -hokuyo::Laser::open(const char * port_name) -{ - if (portOpen()) - close(); - - // Make IO non blocking. This way there are no race conditions that - // cause blocking when a badly behaving process does a read at the same - // time as us. Will need to switch to blocking for writes or errors - // occur just after a replug event. - laser_fd_ = ::open(port_name, O_RDWR | O_NONBLOCK | O_NOCTTY); - read_buf_start = read_buf_end = 0; - - if (laser_fd_ == -1) - { - const char *extra_msg = ""; - switch (errno) - { - case EACCES: - extra_msg = "You probably don't have premission to open the port for reading and writing."; - break; - case ENOENT: - extra_msg = "The requested port does not exist. Is the hokuyo connected? Was the port name misspelled?"; - break; - } - - HOKUYO_EXCEPT(hokuyo::Exception, "Failed to open port: %s. %s (errno = %d). %s", port_name, strerror(errno), errno, extra_msg); - } - try - { - struct flock fl; - fl.l_type = F_WRLCK; - fl.l_whence = SEEK_SET; - fl.l_start = 0; - fl.l_len = 0; - fl.l_pid = getpid(); - - if (fcntl(laser_fd_, F_SETLK, &fl) != 0) - HOKUYO_EXCEPT(hokuyo::Exception, "Device %s is already locked. Try 'lsof | grep %s' to find other processes that currently have the port open.", port_name, port_name); - - // Settings for USB? - struct termios newtio; - tcgetattr(laser_fd_, &newtio); - memset (&newtio.c_cc, 0, sizeof (newtio.c_cc)); - newtio.c_cflag = CS8 | CLOCAL | CREAD; - newtio.c_iflag = IGNPAR; - newtio.c_oflag = 0; - newtio.c_lflag = 0; - - // activate new settings - tcflush (laser_fd_, TCIFLUSH); - if (tcsetattr (laser_fd_, TCSANOW, &newtio) < 0) - HOKUYO_EXCEPT(hokuyo::Exception, "Unable to set serial port attributes. The port you specified (%s) may not be a serial port.", port_name); /// @todo tcsetattr returns true if at least one attribute was set. Hence, we might not have set everything on success. - usleep (200000); - - // Some models (04LX) need to be told to go into SCIP2 mode... - laserFlush(); - // Just in case a previous failure mode has left our Hokuyo - // spewing data, we send reset the laser to be safe. - try { - reset(); - } - catch (hokuyo::Exception &e) - { - // This might be a device that needs to be explicitely placed in - // SCIP2 mode. - // Note: Not tested: a device that is currently scanning in SCIP1.1 - // mode might not manage to switch to SCIP2.0. - - setToSCIP2(); // If this fails then it wasn't a device that could be switched to SCIP2. - reset(); // If this one fails, it really is an error. - } - - querySensorConfig(); - - queryVersionInformation(); // In preparation for calls to get various parts of the version info. - } - catch (hokuyo::Exception& e) - { - // These exceptions mean something failed on open and we should close - if (laser_fd_ != -1) - ::close(laser_fd_); - laser_fd_ = -1; - throw e; - } -} - - -/////////////////////////////////////////////////////////////////////////////// -void hokuyo::Laser::reset () -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - laserFlush(); - try - { - sendCmd("TM2", 1000); - } - catch (hokuyo::Exception &e) - {} // Ignore. If the laser was scanning TM2 would fail - try - { - sendCmd("RS", 1000); - last_time_ = 0; // RS resets the hokuyo clock. - wrapped_ = 0; // RS resets the hokuyo clock. - } - catch (hokuyo::Exception &e) - {} // Ignore. If the command coincided with a scan we might get garbage. - laserFlush(); - sendCmd("RS", 1000); // This one should just work. -} - - -/////////////////////////////////////////////////////////////////////////////// -void -hokuyo::Laser::close () -{ - int retval = 0; - - if (portOpen()) { - //Try to be a good citizen and completely shut down the laser before we shutdown communication - try - { - reset(); - } - catch (hokuyo::Exception& e) { - //Exceptions here can be safely ignored since we are closing the port anyways - } - - retval = ::close(laser_fd_); // Automatically releases the lock. - } - - laser_fd_ = -1; - - if (retval != 0) - HOKUYO_EXCEPT(hokuyo::Exception, "Failed to close port properly -- error = %d: %s\n", errno, strerror(errno)); -} - -/////////////////////////////////////////////////////////////////////////////// -void -hokuyo::Laser::setToSCIP2() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - const char * cmd = "SCIP2.0"; - char buf[100]; - laserWrite(cmd); - laserWrite("\n"); - - laserReadline(buf, 100, 1000); - ROS_DEBUG("Laser comm protocol changed to %s \n", buf); - //printf ("Laser comm protocol changed to %s \n", buf); -} - - -/////////////////////////////////////////////////////////////////////////////// -int -hokuyo::Laser::sendCmd(const char* cmd, int timeout) -{ -if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - char buf[100]; - - laserWrite(cmd); - laserWrite("\n"); - - laserReadlineAfter(buf, 100, cmd, timeout); - laserReadline(buf,100,timeout); - - if (!checkSum(buf,4)) - HOKUYO_EXCEPT(hokuyo::CorruptedDataException, "Checksum failed on status code."); - - buf[2] = 0; - - if (buf[0] - '0' >= 0 && buf[0] - '0' <= 9 && buf[1] - '0' >= 0 && buf[1] - '0' <= 9) - return (buf[0] - '0')*10 + (buf[1] - '0'); - else - HOKUYO_EXCEPT(hokuyo::Exception, "Hokuyo error code returned. Cmd: %s -- Error: %s", cmd, buf); -} - - -/////////////////////////////////////////////////////////////////////////////// -void -hokuyo::Laser::getConfig(LaserConfig& config) -{ - config.min_angle = (amin_ - afrt_) * (2.0*M_PI)/(ares_); - config.max_angle = (amax_ - afrt_) * (2.0*M_PI)/(ares_); - config.ang_increment = (2.0*M_PI)/(ares_); - config.time_increment = (60.0)/(double)(rate_ * ares_); - config.scan_time = 60.0/((double)(rate_)); - config.min_range = dmin_ / 1000.0; - config.max_range = dmax_ / 1000.0; -} - - -/////////////////////////////////////////////////////////////////////////////// -int -hokuyo::Laser::laserWrite(const char* msg) -{ - // IO is currently non-blocking. This is what we want for the more common read case. - int origflags = fcntl(laser_fd_,F_GETFL,0); - fcntl(laser_fd_, F_SETFL, origflags & ~O_NONBLOCK); // @todo can we make this all work in non-blocking? - ssize_t len = strlen(msg); - ssize_t retval = write(laser_fd_, msg, len); - int fputserrno = errno; - fcntl(laser_fd_, F_SETFL, origflags | O_NONBLOCK); - errno = fputserrno; // Don't want to see the fcntl errno below. - - if (retval != -1) - { -#ifdef USE_LOG_FILE - if (strlen(msg) > 1) - { - long long outtime = timeHelper(); - fprintf(logfile, "Out: %lli.%09lli %s\n", outtime / 1000000000L, outtime % 1000000000L, msg); - } -#endif - return retval; - } - else - HOKUYO_EXCEPT(hokuyo::Exception, "fputs failed -- Error = %d: %s", errno, strerror(errno)); -} - - -/////////////////////////////////////////////////////////////////////////////// -int -hokuyo::Laser::laserFlush() -{ - int retval = tcflush(laser_fd_, TCIOFLUSH); - if (retval != 0) - HOKUYO_EXCEPT(hokuyo::Exception, "tcflush failed"); - read_buf_start = 0; - read_buf_end = 0; - - return retval; -} - - -/////////////////////////////////////////////////////////////////////////////// -int -hokuyo::Laser::laserReadline(char *buf, int len, int timeout) -{ - int current=0; - - struct pollfd ufd[1]; - int retval; - ufd[0].fd = laser_fd_; - ufd[0].events = POLLIN; - - if (timeout == 0) - timeout = -1; // For compatibility with former behavior, 0 means no timeout. For poll, negative means no timeout. - - while (true) - { - if (read_buf_start == read_buf_end) // Need to read? - { - if ((retval = poll(ufd, 1, timeout)) < 0) - HOKUYO_EXCEPT(hokuyo::Exception, "poll failed -- error = %d: %s", errno, strerror(errno)); - - if (retval == 0) - HOKUYO_EXCEPT(hokuyo::TimeoutException, "timeout reached"); - - if (ufd[0].revents & POLLERR) - HOKUYO_EXCEPT(hokuyo::Exception, "error on socket, possibly unplugged"); - - int bytes = read(laser_fd_, read_buf, sizeof(read_buf)); - if (bytes == -1 && errno != EAGAIN && errno != EWOULDBLOCK) - HOKUYO_EXCEPT(hokuyo::Exception, "read failed"); - read_buf_start = 0; - read_buf_end = bytes; - } - - while (read_buf_end != read_buf_start) - { - if (current == len - 1) - { - buf[current] = 0; - HOKUYO_EXCEPT(hokuyo::Exception, "buffer filled without end of line being found"); - } - - buf[current] = read_buf[read_buf_start++]; - if (buf[current++] == '\n') - { - buf[current] = 0; - return current; - } - } - -#ifdef USE_LOG_FILE - long long outtime = timeHelper(); - fprintf(logfile, "In: %lli.%09lli %s", outtime / 1000000000L, outtime % 1000000000L, buf); -#endif - } -} - - -char* -hokuyo::Laser::laserReadlineAfter(char* buf, int len, const char* str, int timeout) -{ - buf[0] = 0; - char* ind = &buf[0]; - - int bytes_read = 0; - int skipped = 0; - - while ((strncmp(buf, str, strlen(str))) != 0) { - bytes_read = laserReadline(buf,len,timeout); - - if ((skipped += bytes_read) > MAX_SKIPPED) - HOKUYO_EXCEPT(hokuyo::Exception, "too many bytes skipped while searching for match"); - } - - return ind += strlen(str); -} - - -/////////////////////////////////////////////////////////////////////////////// -void -hokuyo::Laser::querySensorConfig() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - if (sendCmd("PP",1000) != 0) - HOKUYO_EXCEPT(hokuyo::Exception, "Error requesting configuration information"); - - char buf[100]; - char* ind; - - ind = laserReadlineAfter(buf,100,"DMIN:",-1); - sscanf(ind, "%d", &dmin_); - - ind = laserReadlineAfter(buf,100,"DMAX:",-1); - sscanf(ind, "%d", &dmax_); - - ind = laserReadlineAfter(buf,100,"ARES:",-1); - sscanf(ind, "%d", &ares_); - - ind = laserReadlineAfter(buf,100,"AMIN:",-1); - sscanf(ind, "%d", &amin_); - - ind = laserReadlineAfter(buf,100,"AMAX:",-1); - sscanf(ind, "%d", &amax_); - - ind = laserReadlineAfter(buf,100,"AFRT:",-1); - sscanf(ind, "%d", &afrt_); - - ind = laserReadlineAfter(buf,100,"SCAN:",-1); - sscanf(ind, "%d", &rate_); - - return; -} - - -/////////////////////////////////////////////////////////////////////////////// -bool -hokuyo::Laser::checkSum(const char* buf, int buf_len) -{ - char sum = 0; - for (int i = 0; i < buf_len - 2; i++) - sum += (unsigned char)(buf[i]); - - if ((sum & 63) + 0x30 == buf[buf_len - 2]) - return true; - else - return false; -} - - -/////////////////////////////////////////////////////////////////////////////// -uint64_t -hokuyo::Laser::readTime(int timeout) -{ - char buf[100]; - - laserReadline(buf, 100, timeout); - if (!checkSum(buf, 6)) - HOKUYO_EXCEPT(hokuyo::CorruptedDataException, "Checksum failed on time stamp."); - - unsigned int laser_time = ((buf[0]-0x30) << 18) | ((buf[1]-0x30) << 12) | ((buf[2]-0x30) << 6) | (buf[3] - 0x30); - - if (laser_time == last_time_) - { - if (++time_repeat_count_ > 2) - { - HOKUYO_EXCEPT(hokuyo::RepeatedTimeException, "The timestamp has not changed for %d reads", time_repeat_count_); - } - else if (time_repeat_count_ > 0) - ROS_DEBUG("The timestamp has not changed for %d reads. Ignoring for now.", time_repeat_count_); - } - else - { - time_repeat_count_ = 0; - } - - if (laser_time < last_time_) - wrapped_++; - - last_time_ = laser_time; - - return (uint64_t)((wrapped_ << 24) | laser_time)*(uint64_t)(1000000); -} - - -/////////////////////////////////////////////////////////////////////////////// -void -hokuyo::Laser::readData(hokuyo::LaserScan& scan, bool has_intensity, int timeout) -{ - scan.ranges.clear(); - scan.intensities.clear(); - - int data_size = 3; - if (has_intensity) - data_size = 6; - - char buf[100]; - - int ind = 0; - - scan.self_time_stamp = readTime(timeout); - - int bytes; - - int range; - float intensity; - - for (;;) - { - bytes = laserReadline(&buf[ind], 100 - ind, timeout); - - if (bytes == 1) // This is \n\n so we should be done - return; - - if (!checkSum(&buf[ind], bytes)) - HOKUYO_EXCEPT(hokuyo::CorruptedDataException, "Checksum failed on data read."); - - bytes += ind - 2; - - // Read as many ranges as we can get - if(dmax_ > 20000){ // Check error codes for the UTM 30LX (it is the only one with the long max range and has different error codes) - for (int j = 0; j < bytes - (bytes % data_size); j+=data_size) - { - if (scan.ranges.size() < MAX_READINGS) - { - range = (((buf[j]-0x30) << 12) | ((buf[j+1]-0x30) << 6) | (buf[j+2]-0x30)); - - switch (range) // See the SCIP2.0 reference on page 12, Table 4 - { - case 1: // No Object in Range - scan.ranges.push_back(std::numeric_limits::infinity()); - break; - case 2: // Object is too near (Internal Error) - scan.ranges.push_back(-std::numeric_limits::infinity()); - break; - case 3: // Measurement Error (May be due to interference) - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 4: // Object out of range (at the near end) - ///< @todo, Should this be an Infinity Instead? - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 5: // Other errors - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - default: - scan.ranges.push_back(((float)range)/1000.0); - } - - if (has_intensity) - { - intensity = (((buf[j+3]-0x30) << 12) | ((buf[j+4]-0x30) << 6) | (buf[j+5]-0x30)); - scan.intensities.push_back(intensity); - } - } - else - { - HOKUYO_EXCEPT(hokuyo::CorruptedDataException, "Got more readings than expected"); - } - } - } else { // Check error codes for all other lasers (URG-04LX UBG-04LX-F01 UHG-08LX) - for (int j = 0; j < bytes - (bytes % data_size); j+=data_size) - { - if (scan.ranges.size() < MAX_READINGS) - { - range = (((buf[j]-0x30) << 12) | ((buf[j+1]-0x30) << 6) | (buf[j+2]-0x30)); - - switch (range) // See the SCIP2.0 reference on page 12, Table 3 - { - case 0: // Detected object is possibly at 22m - scan.ranges.push_back(std::numeric_limits::infinity()); - break; - case 1: // Reflected light has low intensity - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 2: // Reflected light has low intensity - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 6: // Detected object is possibly at 5.7m - scan.ranges.push_back(std::numeric_limits::infinity()); - break; - case 7: // Distance data on the preceding and succeeding steps have errors - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 8: // Intensity difference of two waves - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 9: // The same step had error in the last two scan - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 10: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 11: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 12: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 13: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 14: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 15: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 16: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 17: // Others - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 18: // Error reading due to strong reflective object - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - case 19: // Non-Measurable step - scan.ranges.push_back(std::numeric_limits::quiet_NaN()); - break; - default: - scan.ranges.push_back(((float)range)/1000.0); - } - - if (has_intensity) - { - intensity = (((buf[j+3]-0x30) << 12) | ((buf[j+4]-0x30) << 6) | (buf[j+5]-0x30)); - scan.intensities.push_back(intensity); - } - } - else - { - HOKUYO_EXCEPT(hokuyo::CorruptedDataException, "Got more readings than expected"); - } - } - } - // Shuffle remaining bytes to front of buffer to get them on the next loop - ind = 0; - for (int j = bytes - (bytes % data_size); j < bytes ; j++) - buf[ind++] = buf[j]; - } -} - - -/////////////////////////////////////////////////////////////////////////////// -int -hokuyo::Laser::pollScan(hokuyo::LaserScan& scan, double min_ang, double max_ang, int cluster, int timeout) -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - int status; - - // Always clear ranges/intensities so we can return easily in case of erro - scan.ranges.clear(); - scan.intensities.clear(); - - // clustering of 0 and 1 are actually the same - if (cluster == 0) - cluster = 1; - - int min_i = (int)(afrt_ + min_ang*ares_/(2.0*M_PI)); - int max_i = (int)(afrt_ + max_ang*ares_/(2.0*M_PI)); - - char cmdbuf[MAX_CMD_LEN]; - - sprintf(cmdbuf,"GD%.4d%.4d%.2d", min_i, max_i, cluster); - - status = sendCmd(cmdbuf, timeout); - - scan.system_time_stamp = timeHelper() + offset_; - - if (status != 0) - return status; - - // Populate configuration - scan.config.min_angle = (min_i - afrt_) * (2.0*M_PI)/(ares_); - scan.config.max_angle = (max_i - afrt_) * (2.0*M_PI)/(ares_); - scan.config.ang_increment = cluster*(2.0*M_PI)/(ares_); - scan.config.time_increment = (60.0)/(double)(rate_ * ares_); - scan.config.scan_time = 0.0; - scan.config.min_range = dmin_ / 1000.0; - scan.config.max_range = dmax_ / 1000.0; - - readData(scan, false, timeout); - - long long inc = (long long)(min_i * scan.config.time_increment * 1000000000); - - scan.system_time_stamp += inc; - scan.self_time_stamp += inc; - - return 0; -} - -int -hokuyo::Laser::laserOn() { - int res = sendCmd("BM",1000); - if (res == 1) - HOKUYO_EXCEPT(hokuyo::Exception, "Unable to control laser due to malfunction."); - return res; -} - -int -hokuyo::Laser::laserOff() { - return sendCmd("QT",1000); -} - -int -hokuyo::Laser::stopScanning() { - try { - return laserOff(); - } - catch (hokuyo::Exception &e) - { - // Ignore exception because we might have gotten part of a scan - // instead of the expected response, which shows up as a bad checksum. - laserFlush(); - } - return laserOff(); // This one should work because the scan is stopped. -} - -/////////////////////////////////////////////////////////////////////////////// -int -hokuyo::Laser::requestScans(bool intensity, double min_ang, double max_ang, int cluster, int skip, int count, int timeout) -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - //! @todo check that values are within range? - - int status; - - if (cluster == 0) - cluster = 1; - - int min_i = (int)(afrt_ + min_ang*ares_/(2.0*M_PI)); - int max_i = (int)(afrt_ + max_ang*ares_/(2.0*M_PI)); - - char cmdbuf[MAX_CMD_LEN]; - - char intensity_char = 'D'; - if (intensity) - intensity_char = 'E'; - - sprintf(cmdbuf,"M%c%.4d%.4d%.2d%.1d%.2d", intensity_char, min_i, max_i, cluster, skip, count); - - status = sendCmd(cmdbuf, timeout); - - return status; -} - -bool -hokuyo::Laser::isIntensitySupported() -{ - hokuyo::LaserScan scan; - - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - // Try an intensity command. - try - { - requestScans(1, 0, 0, 0, 0, 1); - serviceScan(scan, 1000); - return true; - } - catch (hokuyo::Exception &e) - {} - - // Try a non intensity command. - try - { - requestScans(0, 0, 0, 0, 0, 1); - serviceScan(scan, 1000); - return false; - } - catch (hokuyo::Exception &e) - { - HOKUYO_EXCEPT(hokuyo::Exception, "Exception whil trying to determine if intensity scans are supported.") - } -} - -int -hokuyo::Laser::serviceScan(hokuyo::LaserScan& scan, int timeout) -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - // Always clear ranges/intensities so we can return easily in case of erro - scan.ranges.clear(); - scan.intensities.clear(); - - char buf[100]; - - bool intensity = false; - int min_i; - int max_i; - int cluster; - int skip; - int left; - - char* ind; - - int status = -1; - - do { - ind = laserReadlineAfter(buf, 100, "M",timeout); - scan.system_time_stamp = timeHelper() + offset_; - - if (ind[0] == 'D') - intensity = false; - else if (ind[0] == 'E') - intensity = true; - else - continue; - - ind++; - - sscanf(ind, "%4d%4d%2d%1d%2d", &min_i, &max_i, &cluster, &skip, &left); - laserReadline(buf,100,timeout); - - buf[4] = 0; - - if (!checkSum(buf, 4)) - HOKUYO_EXCEPT(hokuyo::CorruptedDataException, "Checksum failed on status code: %s", buf); - - sscanf(buf, "%2d", &status); - - if (status != 99) - return status; - - } while(status != 99); - - scan.config.min_angle = (min_i - afrt_) * (2.0*M_PI)/(ares_); - scan.config.max_angle = (max_i - afrt_) * (2.0*M_PI)/(ares_); - scan.config.ang_increment = cluster*(2.0*M_PI)/(ares_); - scan.config.time_increment = (60.0)/(double)(rate_ * ares_); - scan.config.scan_time = (60.0 * (skip + 1))/((double)(rate_)); - scan.config.min_range = dmin_ / 1000.0; - scan.config.max_range = dmax_ / 1000.0; - - readData(scan, intensity, timeout); - - long long inc = (long long)(min_i * scan.config.time_increment * 1000000000); - - scan.system_time_stamp += inc; - scan.self_time_stamp += inc; - -// printf("Scan took %lli.\n", -scan.system_time_stamp + timeHelper() + offset_); - - return 0; -} - -////////////////////////////////////////////////////////////////////////////// -void -hokuyo::Laser::queryVersionInformation() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - if (sendCmd("VV",1000) != 0) - HOKUYO_EXCEPT(hokuyo::Exception, "Error requesting version information"); - - char buf[100]; - vendor_name_ = laserReadlineAfter(buf, 100, "VEND:"); - vendor_name_ = vendor_name_.substr(0,vendor_name_.length() - 3); - - product_name_ = laserReadlineAfter(buf, 100, "PROD:"); - product_name_ = product_name_.substr(0,product_name_.length() - 3); - - firmware_version_ = laserReadlineAfter(buf, 100, "FIRM:"); - firmware_version_ = firmware_version_.substr(0,firmware_version_.length() - 3); - - protocol_version_ = laserReadlineAfter(buf, 100, "PROT:"); - protocol_version_ = protocol_version_.substr(0,protocol_version_.length() - 3); - - // This crazy naming scheme is for backward compatibility. Initially - // the serial number always started with an H. Then it got changed to a - // zero. For a while the driver was removing the leading zero in the - // serial number. This is fine as long as it is indeed a zero in front. - // The current behavior is backward compatible but will accomodate full - // length serial numbers. - serial_number_ = laserReadlineAfter(buf, 100, "SERI:"); - serial_number_ = serial_number_.substr(0,serial_number_.length() - 3); - if (serial_number_[0] == '0') - serial_number_[0] = 'H'; - else if (serial_number_[0] != 'H') - serial_number_ = 'H' + serial_number_; -} - - -////////////////////////////////////////////////////////////////////////////// -std::string -hokuyo::Laser::getID() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - return serial_number_; -} - - -////////////////////////////////////////////////////////////////////////////// -std::string -hokuyo::Laser::getFirmwareVersion() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - return firmware_version_; -} - - -////////////////////////////////////////////////////////////////////////////// -std::string -hokuyo::Laser::getProtocolVersion() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - return protocol_version_; -} - - -////////////////////////////////////////////////////////////////////////////// -std::string -hokuyo::Laser::getVendorName() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - return vendor_name_; -} - - -////////////////////////////////////////////////////////////////////////////// -std::string -hokuyo::Laser::getProductName() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - return product_name_; -} - - -////////////////////////////////////////////////////////////////////////////// -std::string -hokuyo::Laser::getStatus() -{ - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - if (sendCmd("II",1000) != 0) - HOKUYO_EXCEPT(hokuyo::Exception, "Error requesting device information information"); - - char buf[100]; - char* stat = laserReadlineAfter(buf, 100, "STAT:"); - - std::string statstr(stat); - statstr = statstr.substr(0,statstr.length() - 3); - - return statstr; -} - -template -C median(std::vector &v) -{ - std::vector::iterator start = v.begin(); - std::vector::iterator end = v.end(); - std::vector::iterator median = start + (end - start) / 2; - //std::vector::iterator quarter1 = median - (end - start) / 4; - //std::vector::iterator quarter2 = median + (end - start) / 4; - std::nth_element(start, median, end); - //long long int medianval = *median; - //std::nth_element(start, quarter1, end); - //long long int quarter1val = *quarter1; - //std::nth_element(start, quarter2, end); - //long long int quarter2val = *quarter2; - return *median; -} - -#if 1 -long long int hokuyo::Laser::getHokuyoClockOffset(int reps, int timeout) -{ - std::vector offset(reps); - - sendCmd("TM0",timeout); - for (int i = 0; i < reps; i++) - { - long long int prestamp = timeHelper(); - sendCmd("TM1",timeout); - long long int hokuyostamp = readTime(); - long long int poststamp = timeHelper(); - offset[i] = hokuyostamp - (prestamp + poststamp) / 2; - //printf("%lli %lli %lli", hokuyostamp, prestamp, poststamp); - } - sendCmd("TM2",timeout); - - long long out = median(offset); - - return out; -} - -long long int hokuyo::Laser::getHokuyoScanStampToSystemStampOffset(bool intensity, double min_ang, double max_ang, int clustering, int skip, int reps, int timeout) -{ - if (reps < 1) - reps = 1; - else if (reps > 99) - reps = 99; - - std::vector offset(reps); - - if (requestScans(intensity, min_ang, max_ang, clustering, skip, reps, timeout) != 0) - { - HOKUYO_EXCEPT(hokuyo::Exception, "Error requesting scan while caliblating time."); - return 1; - } - - hokuyo::LaserScan scan; - for (int i = 0; i < reps; i++) - { - serviceScan(scan, timeout); - //printf("%lli %lli\n", scan.self_time_stamp, scan.system_time_stamp); - offset[i] = scan.self_time_stamp - scan.system_time_stamp; - } - - return median(offset); -} - -////////////////////////////////////////////////////////////////////////////// -long long -hokuyo::Laser::calcLatency(bool intensity, double min_ang, double max_ang, int clustering, int skip, int num, int timeout) -{ - offset_ = 0; - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - if (num <= 0) - num = 10; - - int ckreps = 1; - int scanreps = 1; - long long int start = getHokuyoClockOffset(ckreps, timeout); - long long int pre = 0; - std::vector samples(num); - for (int i = 0; i < num; i++) - { - long long int scan = getHokuyoScanStampToSystemStampOffset(intensity, min_ang, max_ang, clustering, skip, scanreps, timeout) - start; - long long int post = getHokuyoClockOffset(ckreps, timeout) - start; - samples[i] = scan - (post+pre)/2; - //printf("%lli %lli %lli %lli %lli\n", samples[i], post, pre, scan, pre - post); - //fflush(stdout); - pre = post; - } - - offset_ = median(samples); - //printf("%lli\n", median(samples)); - return offset_; -} - -#else -////////////////////////////////////////////////////////////////////////////// -long long -hokuyo::Laser::calcLatency(bool intensity, double min_ang, double max_ang, int clustering, int skip, int num, int timeout) -{ - ROS_DEBUG("Entering calcLatency."); - - if (!portOpen()) - HOKUYO_EXCEPT(hokuyo::Exception, "Port not open."); - - static const std::string buggy_version = "1.16.02(19/Jan./2010)"; - if (firmware_version_ == buggy_version) - { - ROS_INFO("Hokuyo firmware version %s detected. Using hard-coded time offset of -23 ms.", - buggy_version.c_str()); - offset_ = -23000000; - } - else - { - offset_ = 0; - - uint64_t comp_time = 0; - uint64_t laser_time = 0; - long long diff_time = 0; - long long drift_time = 0; - long long tmp_offset1 = 0; - long long tmp_offset2 = 0; - - int count = 0; - - sendCmd("TM0",timeout); - count = 100; - - for (int i = 0; i < count;i++) - { - usleep(1000); - sendCmd("TM1",timeout); - comp_time = timeHelper(); - try - { - laser_time = readTime(); - - diff_time = comp_time - laser_time; - - tmp_offset1 += diff_time / count; - } catch (hokuyo::RepeatedTimeException &e) - { - // We expect to get Repeated Time's when hammering on the time server - continue; - } - } - - uint64_t start_time = timeHelper(); - usleep(5000000); - sendCmd("TM1;a",timeout); - sendCmd("TM1;b",timeout); - comp_time = timeHelper(); - drift_time = comp_time - start_time; - laser_time = readTime() + tmp_offset1; - diff_time = comp_time - laser_time; - double drift_rate = double(diff_time) / double(drift_time); - - sendCmd("TM2",timeout); - - if (requestScans(intensity, min_ang, max_ang, clustering, skip, num, timeout) != 0) - HOKUYO_EXCEPT(hokuyo::Exception, "Error requesting scans during latency calculation"); - - hokuyo::LaserScan scan; - - count = 200; - for (int i = 0; i < count;i++) - { - try - { - serviceScan(scan, 1000); - } catch (hokuyo::CorruptedDataException &e) { - continue; - } - - comp_time = scan.system_time_stamp; - drift_time = comp_time - start_time; - laser_time = scan.self_time_stamp + tmp_offset1 + (long long)(drift_time*drift_rate); - diff_time = laser_time - comp_time; - - tmp_offset2 += diff_time / count; - } - - offset_ = tmp_offset2; - - stopScanning(); - } - - ROS_DEBUG("Leaving calcLatency."); - - return offset_; -} -#endif diff --git a/hokuyo_node/src/hokuyo_node.cpp b/hokuyo_node/src/hokuyo_node.cpp deleted file mode 100644 index f8ad7f38..00000000 --- a/hokuyo_node/src/hokuyo_node.cpp +++ /dev/null @@ -1,645 +0,0 @@ -/********************************************************************* -* Software License Agreement (BSD License) -* -* Copyright (c) 2008-2010, Willow Garage, Inc. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following -* disclaimer in the documentation and/or other materials provided -* with the distribution. -* * Neither the name of the Willow Garage nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -*********************************************************************/ - -#include "driver_base/driver.h" -#include "driver_base/driver_node.h" -#include - -#include -#include -#include -#include -#include - -#include "ros/ros.h" - -#include "sensor_msgs/LaserScan.h" - -#include "hokuyo_node/HokuyoConfig.h" - -#include "hokuyo_node/hokuyo.h" - -using namespace std; - -class HokuyoDriver : public driver_base::Driver -{ - friend class HokuyoNode; - - typedef boost::function UseScanFunction; - UseScanFunction useScan_; - - boost::shared_ptr scan_thread_; - - std::string device_status_; - std::string device_id_; - std::string last_seen_device_id_; - - bool first_scan_; - - std::string vendor_name_; - std::string product_name_; - std::string protocol_version_; - std::string firmware_version_; - - std::string connect_fail_; - - hokuyo::LaserScan scan_; - hokuyo::Laser laser_; - hokuyo::LaserConfig laser_config_; - - bool calibrated_; - int lost_scan_thread_count_; - int corrupted_scan_count_; - -public: - hokuyo_node::HokuyoConfig config_; - typedef hokuyo_node::HokuyoConfig Config; - - HokuyoDriver() - { - calibrated_ = false; - lost_scan_thread_count_ = 0; - corrupted_scan_count_ = 0; - } - - bool checkAngleRange(Config &conf) - { - bool changed = false; - - if (conf.min_ang < laser_config_.min_angle) - { - changed = true; - if (laser_config_.min_angle - conf.min_ang > 1e-10) /// @todo Avoids warning when restarting node pending ros#2353 getting fixed. - { - ROS_WARN("Requested angle (%f rad) out of range, using minimum scan angle supported by device: %f rad.", - conf.min_ang, laser_config_.min_angle); - } - conf.min_ang = laser_config_.min_angle; - } - - double max_safe_angular_range_per_cluster_deg = 95; - if (firmware_version_ == "1.16.01(16/Nov./2009)") - max_safe_angular_range_per_cluster_deg = 190; - - int real_cluster = conf.cluster == 0 ? 1 : conf.cluster; - double max_safe_angular_range = (real_cluster * max_safe_angular_range_per_cluster_deg) * M_PI / 180; - - if (conf.intensity && (conf.max_ang - conf.min_ang) > max_safe_angular_range + 1e-8 && - !config_.allow_unsafe_settings && laser_.getProductName() == - "SOKUIKI Sensor TOP-URG UTM-30LX") - { - changed = true; - conf.max_ang = conf.min_ang + max_safe_angular_range; - ROS_WARN("More than %f degree/cluster scan range requested on UTM-30LX firmware version %s in intensity mode with cluster=%i. The max_ang was adjusted to limit the range. You may extend the scanner's angular range using the allow_unsafe_settings option, but this may result in incorrect data or laser crashes that will require a power cycle of the laser.", max_safe_angular_range_per_cluster_deg, firmware_version_.c_str(), real_cluster); - } - - if (conf.max_ang - laser_config_.max_angle > 1e-10) /// @todo Avoids warning when restarting node pending ros#2353 getting fixed. - { - changed = true; - ROS_WARN("Requested angle (%f rad) out of range, using maximum scan angle supported by device: %f rad.", - conf.max_ang, laser_config_.max_angle); - conf.max_ang = laser_config_.max_angle; - } - - if (conf.min_ang > conf.max_ang) - { - changed = true; - if (conf.max_ang < laser_config_.min_angle) - { - if (laser_config_.min_angle - conf.max_ang > 1e-10) /// @todo Avoids warning when restarting node pending ros#2353 getting fixed. - ROS_WARN("Requested angle (%f rad) out of range, using minimum scan angle supported by device: %f rad.", - conf.max_ang, laser_config_.min_angle); - conf.max_ang = laser_config_.min_angle; - } - ROS_WARN("Minimum angle must be greater than maximum angle. Adjusting min_ang."); - conf.min_ang = conf.max_ang; - } - - return changed; - } - - bool checkIntensitySupport(Config &conf) - { - if (conf.intensity && !laser_.isIntensitySupported()) - { - ROS_WARN("This unit does not appear to support intensity mode. Turning intensity off."); - conf.intensity = false; - return true; - } - return false; - } - - void doOpen() - { - try - { - std::string old_device_id = device_id_; - device_id_ = "unknown"; - device_status_ = "unknown"; - first_scan_ = true; - - laser_.open(config_.port.c_str()); - - device_id_ = getID(); - vendor_name_ = laser_.getVendorName(); - firmware_version_ = laser_.getFirmwareVersion(); - product_name_ = laser_.getProductName(); - protocol_version_ = laser_.getProtocolVersion(); - - device_status_ = laser_.getStatus(); - if (device_status_ != std::string("Sensor works well.")) - { - doClose(); - setStatusMessagef("Laser returned abnormal status message, aborting: %s You may be able to find further information at http://www.ros.org/wiki/hokuyo_node/Troubleshooting/", device_status_.c_str()); - return; - } - - if (old_device_id != device_id_) - { - ROS_INFO("Connected to device with ID: %s", device_id_.c_str()); - - if (last_seen_device_id_ != device_id_) - { - // Recalibrate when the device changes. - last_seen_device_id_ = device_id_; - calibrated_ = false; - } - - // Do this elaborate retry circuis if we were just plugged in. - for (int retries = 10;; retries--) - try { - laser_.laserOn(); - break; - } - catch (hokuyo::Exception &e) - { - if (!retries) - throw e; // After trying for 10 seconds, give up and throw the exception. - else if (retries == 10) - ROS_WARN("Could not turn on laser. This may happen just after the device is plugged in. Will retry for 10 seconds."); - ros::Duration(1).sleep(); - } - } - else - laser_.laserOn(); // Otherwise, it should just work, so no tolerance. - - if (config_.calibrate_time && !calibrated_) - { - ROS_INFO("Starting calibration. This will take up a few seconds."); - double latency = laser_.calcLatency(false && config_.intensity, config_.min_ang, config_.max_ang, config_.cluster, config_.skip) * 1e-9; - calibrated_ = true; // This is a slow step that we only want to do once. - ROS_INFO("Calibration finished. Latency is: %0.4f", latency); - } - else - { - calibrated_ = false; - laser_.clearLatency(); - } - - setStatusMessage("Device opened successfully.", true); - laser_.getConfig(laser_config_); - - state_ = OPENED; - } - catch (hokuyo::Exception& e) - { - doClose(); - setStatusMessagef("Exception thrown while opening Hokuyo.\n%s", e.what()); - return; - } - } - - void doClose() - { - try - { - laser_.close(); - setStatusMessage("Device closed successfully.", true); - } catch (hokuyo::Exception& e) { - setStatusMessagef("Exception thrown while trying to close:\n%s",e.what()); - } - - state_ = CLOSED; // If we can't close, we are done for anyways. - } - - void doStart() - { - try - { - laser_.laserOn(); - - int status = laser_.requestScans(config_.intensity, config_.min_ang, config_.max_ang, config_.cluster, config_.skip); - - if (status != 0) { - setStatusMessagef("Failed to request scans from device. Status: %d.", status); - corrupted_scan_count_++; - return; - } - - setStatusMessagef("Waiting for first scan.", true); - state_ = RUNNING; - scan_thread_.reset(new boost::thread(boost::bind(&HokuyoDriver::scanThread, this))); - } - catch (hokuyo::Exception& e) - { - doClose(); - setStatusMessagef("Exception thrown while starting Hokuyo.\n%s", e.what()); - connect_fail_ = e.what(); - return; - } - } - - void doStop() - { - if (state_ != RUNNING) // RUNNING can exit asynchronously. - return; - - state_ = OPENED; - - if (scan_thread_ && !scan_thread_->timed_join((boost::posix_time::milliseconds) 2000)) - { - ROS_ERROR("scan_thread_ did not die after two seconds. Pretending that it did. This is probably a bad sign."); - lost_scan_thread_count_++; - } - scan_thread_.reset(); - - setStatusMessagef("Stopped.", true); - } - - virtual std::string getID() - { - std::string id = laser_.getID(); - if (id == std::string("H0000000")) - return "unknown"; - return id; - } - - void config_update(Config &new_config, int level = 0) - { - ROS_DEBUG("Reconfigure called from state %i", state_); - - if (state_ == OPENED) - // If it is closed, we don't know what to check for. If it is running those parameters haven't changed, - // and talking to the hokuyo would cause loads of trouble. - { - checkIntensitySupport(new_config); - checkAngleRange(new_config); - } - - config_ = new_config; - } - - void scanThread() - { - while (state_ == RUNNING) - { - try - { - int status = laser_.serviceScan(scan_); - - if(status != 0) - { - ROS_WARN("Error getting scan: %d", status); - break; - } - } catch (hokuyo::CorruptedDataException &e) { - ROS_WARN("Skipping corrupted data"); - continue; - } catch (hokuyo::Exception& e) { - ROS_WARN("Exception thrown while trying to get scan.\n%s", e.what()); - doClose(); - return; - } - - if (first_scan_) - { - first_scan_ = false; - setStatusMessage("Streaming data.", true, true); - ROS_INFO("Streaming data."); - } - - useScan_(scan_); - } - - try - { - laser_.stopScanning(); // This actually just calls laser Off internally. - } catch (hokuyo::Exception &e) - { - ROS_WARN("Exception thrown while trying to stop scan.\n%s", e.what()); - } - state_ = OPENED; - } -}; - -class HokuyoNode : public driver_base::DriverNode -{ -private: - string connect_fail_; - - double desired_freq_; - - ros::NodeHandle node_handle_; - diagnostic_updater::DiagnosedPublisher scan_pub_; - sensor_msgs::LaserScan scan_msg_; - diagnostic_updater::FunctionDiagnosticTask hokuyo_diagnostic_task_; - -public: - HokuyoNode(ros::NodeHandle &nh) : - driver_base::DriverNode(nh), - node_handle_(nh), - scan_pub_(node_handle_.advertise("scan", 100), - diagnostic_, - diagnostic_updater::FrequencyStatusParam(&desired_freq_, &desired_freq_, 0.05), - diagnostic_updater::TimeStampStatusParam()), - hokuyo_diagnostic_task_("Hokuyo Diagnostics", boost::bind(&HokuyoNode::connectionStatus, this, _1)) - { - desired_freq_ = 0; - driver_.useScan_ = boost::bind(&HokuyoNode::publishScan, this, _1); - driver_.setPostOpenHook(boost::bind(&HokuyoNode::postOpenHook, this)); - - // Check if use_rep_117 is set. - std::string key; - if (nh.searchParam("use_rep_117", key)) - { - ROS_ERROR("The use_rep_117 parameter has not been specified and is now ignored. This parameter was removed in Hydromedusa. Please see: http://ros.org/wiki/rep_117/migration"); - } - } - - void postOpenHook() - { - private_node_handle_.setParam("min_ang_limit", (double) (driver_.laser_config_.min_angle)); - private_node_handle_.setParam("max_ang_limit", (double) (driver_.laser_config_.max_angle)); - private_node_handle_.setParam("min_range", (double) (driver_.laser_config_.min_range)); - private_node_handle_.setParam("max_range", (double) (driver_.laser_config_.max_range)); - - diagnostic_.setHardwareID(driver_.getID()); - - if (driver_.checkIntensitySupport(driver_.config_) || - driver_.checkAngleRange(driver_.config_)) // Might have been set before the device's range was known. - reconfigure_server_.updateConfig(driver_.config_); - - scan_pub_.clear_window(); // Reduce glitches in the frequency diagnostic. - } - - virtual void addOpenedTests() - { - self_test_.add( "Status Test", this, &HokuyoNode::statusTest ); - self_test_.add( "Laser Test", this, &HokuyoNode::laserTest ); - self_test_.add( "Polled Data Test", this, &HokuyoNode::polledDataTest ); - self_test_.add( "Streamed Data Test", this, &HokuyoNode::streamedDataTest ); - self_test_.add( "Streamed Intensity Data Test", this, &HokuyoNode::streamedIntensityDataTest ); - self_test_.add( "Laser Off Test", this, &HokuyoNode::laserOffTest ); - } - - virtual void addStoppedTests() - { - } - - virtual void addRunningTests() - { - } - - virtual void addDiagnostics() - { - driver_status_diagnostic_.addTask(&hokuyo_diagnostic_task_); - } - - void reconfigureHook(int level) - { - if (private_node_handle_.hasParam("frameid")) - { - ROS_WARN("~frameid is deprecated, please use ~frame_id instead"); - private_node_handle_.getParam("frameid", driver_.config_.frame_id); - } - - if (private_node_handle_.hasParam("min_ang_degrees")) - { - ROS_WARN("~min_ang_degrees is deprecated, please use ~min_ang instead"); - private_node_handle_.getParam("min_ang_degrees", driver_.config_.min_ang); - driver_.config_.min_ang *= M_PI/180; - } - - if (private_node_handle_.hasParam("max_ang_degrees")) - { - ROS_WARN("~max_ang_degrees is deprecated, please use ~max_ang instead"); - private_node_handle_.getParam("max_ang_degrees", driver_.config_.max_ang); - driver_.config_.max_ang *= M_PI/180; - } - - diagnostic_.force_update(); - - scan_pub_.clear_window(); // Reduce glitches in the frequency diagnostic. - } - - int publishScan(const hokuyo::LaserScan &scan) - { - //ROS_DEBUG("publishScan"); - - scan_msg_.angle_min = scan.config.min_angle; - scan_msg_.angle_max = scan.config.max_angle; - scan_msg_.angle_increment = scan.config.ang_increment; - scan_msg_.time_increment = scan.config.time_increment; - scan_msg_.scan_time = scan.config.scan_time; - scan_msg_.range_min = scan.config.min_range; - scan_msg_.range_max = scan.config.max_range; - scan_msg_.ranges = scan.ranges; - scan_msg_.intensities = scan.intensities; - scan_msg_.header.stamp = ros::Time().fromNSec((uint64_t)scan.system_time_stamp) + ros::Duration(driver_.config_.time_offset); - scan_msg_.header.frame_id = driver_.config_.frame_id; - - desired_freq_ = (1. / scan.config.scan_time); - - scan_pub_.publish(scan_msg_); - - //ROS_DEBUG("publishScan done"); - - return(0); - } - - void connectionStatus(diagnostic_updater::DiagnosticStatusWrapper& status) - { - if (driver_.state_ == driver_.CLOSED) - status.summary(2, "Not connected. " + driver_.device_status_ + " " + connect_fail_); - else if (driver_.device_status_ != std::string("Sensor works well.")) - status.summaryf(2, "Abnormal status: %s", driver_.device_status_.c_str()); - else if (driver_.state_ == driver_.RUNNING) - { - if (driver_.first_scan_) - status.summary(0, "Waiting for first scan"); - else - status.summary(0, "Streaming"); - } - else if (driver_.state_ == driver_.OPENED) - status.summary(0, "Open"); - else - status.summary(2, "Unknown state"); - - status.add("Device Status", driver_.device_status_); - status.add("Port", driver_.config_.port); - status.add("Device ID", driver_.device_id_); - status.add("Scan Thread Lost Count", driver_.lost_scan_thread_count_); - status.add("Corrupted Scan Count", driver_.corrupted_scan_count_); - status.add("Vendor Name", driver_.vendor_name_); - status.add("Product Name", driver_.product_name_); - status.add("Firmware Version", driver_.firmware_version_); - status.add("Protocol Version", driver_.protocol_version_); - status.add("Computed Latency", driver_.laser_.getLatency()); - status.add("User Time Offset", driver_.config_.time_offset); - } - - void statusTest(diagnostic_updater::DiagnosticStatusWrapper& status) - { - std::string stat = driver_.laser_.getStatus(); - - if (stat != std::string("Sensor works well.")) - { - status.level = 2; - } else { - status.level = 0; - } - - status.message = stat; - } - - void laserTest(diagnostic_updater::DiagnosticStatusWrapper& status) - { - driver_.laser_.laserOn(); - - status.level = 0; - status.message = "Laser turned on successfully."; - } - - void polledDataTest(diagnostic_updater::DiagnosticStatusWrapper& status) - { - hokuyo::LaserScan scan; - - int res = driver_.laser_.pollScan(scan, driver_.laser_config_.min_angle, driver_.laser_config_.max_angle, 1, 1000); - - if (res != 0) - { - status.level = 2; - ostringstream oss; - oss << "Hokuyo error code: " << res << ". Consult manual for meaning."; - status.message = oss.str(); - - } else { - status.level = 0; - status.message = "Polled Hokuyo for data successfully."; - } - } - - void streamedDataTest(diagnostic_updater::DiagnosticStatusWrapper& status) - { - hokuyo::LaserScan scan; - - int res = driver_.laser_.requestScans(false, driver_.laser_config_.min_angle, driver_.laser_config_.max_angle, 1, 1, 99, 1000); - - if (res != 0) - { - status.level = 2; - ostringstream oss; - oss << "Hokuyo error code: " << res << ". Consult manual for meaning."; - status.message = oss.str(); - - } else { - - for (int i = 0; i < 99; i++) - { - driver_.laser_.serviceScan(scan, 1000); - } - - status.level = 0; - status.message = "Streamed data from Hokuyo successfully."; - - } - } - - void streamedIntensityDataTest(diagnostic_updater::DiagnosticStatusWrapper& status) - { - hokuyo::LaserScan scan; - - int res = driver_.laser_.requestScans(false, driver_.laser_config_.min_angle, driver_.laser_config_.max_angle, 1, 1, 99, 1000); - - if (res != 0) - { - status.level = 2; - ostringstream oss; - oss << "Hokuyo error code: " << res << ". Consult manual for meaning."; - status.message = oss.str(); - - } else { - - int corrupted_data = 0; - - for (int i = 0; i < 99; i++) - { - try { - driver_.laser_.serviceScan(scan, 1000); - } catch (hokuyo::CorruptedDataException &e) { - corrupted_data++; - } - } - if (corrupted_data == 1) - { - status.level = 1; - status.message = "Single corrupted message. This is acceptable and unavoidable"; - } else if (corrupted_data > 1) - { - status.level = 2; - ostringstream oss; - oss << corrupted_data << " corrupted messages."; - status.message = oss.str(); - } else - { - status.level = 0; - status.message = "Stramed data with intensity from Hokuyo successfully."; - } - } - } - - void laserOffTest(diagnostic_updater::DiagnosticStatusWrapper& status) - { - driver_.laser_.laserOff(); - - status.level = 0; - status.message = "Laser turned off successfully."; - } -}; - -int main(int argc, char **argv) -{ - return driver_base::main(argc, argv, "hokuyo_node"); -} - diff --git a/hokuyo_node/src/timestamp_test.cpp b/hokuyo_node/src/timestamp_test.cpp deleted file mode 100644 index 99438ad9..00000000 --- a/hokuyo_node/src/timestamp_test.cpp +++ /dev/null @@ -1,202 +0,0 @@ -#include -#include -#include -#include - -static uint64_t timeHelper() -{ -#if POSIX_TIMERS > 0 - struct timespec curtime; - clock_gettime(CLOCK_REALTIME, &curtime); - return (uint64_t)(curtime.tv_sec) * 1000000000 + (uint64_t)(curtime.tv_nsec); -#else - struct timeval timeofday; - gettimeofday(&timeofday,NULL); - return (uint64_t)(timeofday.tv_sec) * 1000000000 + (uint64_t)(timeofday.tv_usec) * 1000; -#endif -} - -template -C median(std::vector &v) -{ - std::vector::iterator start = v.begin(); - std::vector::iterator end = v.end(); - std::vector::iterator median = start + (end - start) / 2; - //std::vector::iterator quarter1 = median - (end - start) / 4; - //std::vector::iterator quarter2 = median + (end - start) / 4; - std::nth_element(start, median, end); - //long long int medianval = *median; - //std::nth_element(start, quarter1, end); - //long long int quarter1val = *quarter1; - //std::nth_element(start, quarter2, end); - //long long int quarter2val = *quarter2; - return *median; -} - -long long int getClockOffset(hokuyo::Laser &laser, int reps) -{ - std::vector offset(reps); - int timeout = 1000; - - laser.sendCmd("TM0",timeout); - for (int i = 0; i < reps; i++) - { - long long int prestamp = timeHelper(); - laser.sendCmd("TM1",timeout); - long long int hokuyostamp = laser.readTime(); - long long int poststamp = timeHelper(); - offset[i] = hokuyostamp - (prestamp + poststamp) / 2; - printf("%lli %lli %lli - ", prestamp, hokuyostamp, poststamp); - } - laser.sendCmd("TM2",timeout); - - return median(offset); -} - -long long int getScanOffset(hokuyo::Laser &laser, int reps) -{ - std::vector offset(reps); - int timeout = 1000; - - if (reps > 99) - reps = 99; - - if (laser.requestScans(1, -2, 2, 0, 0, reps, timeout) != 0) - { - fprintf(stderr, "Error requesting scan.\n"); - return 1; - } - - hokuyo::LaserScan scan; - for (int i = 0; i < reps; i++) - { - laser.serviceScan(scan, timeout); - offset[i] = scan.self_time_stamp - scan.system_time_stamp; - printf("%lli %lli - ", scan.self_time_stamp, scan.system_time_stamp); - } - - return median(offset); -} - -long long int getDataOffset(hokuyo::Laser &laser, int cycles) -{ - int ckreps = 1; - int scanreps = 1; - long long int pre = getClockOffset(laser, ckreps); - std::vector samples(cycles); - for (int i = 0; i < cycles; i++) - { - long long int scan = getScanOffset(laser, ckreps); - long long int post = getClockOffset(laser, scanreps); - samples[i] = scan - (post+pre)/2; -// printf("%lli %lli %lli %lli\n", samples[i], post, pre, scan); -// fflush(stdout); - pre = post; - } - - printf("%lli\n", median(samples)); - return median(samples); -} - -int main(int argc, char **argv) -{ - if (argc != 2) - { - fprintf(stderr, "usage: timestamp_test \n"); - return 1; - } - - char *port = argv[1]; - - hokuyo::Laser laser; - - //printf("# %s\n", laser.getFirmwareVersion().c_str()); - //fprintf(stderr, "%s\n", laser.getFirmwareVersion().c_str()); - - /* - int timeout = 1000; - laser.sendCmd("TM0",timeout); - long long int pc_start = timeHelper(); - laser.sendCmd("TM1",timeout); - long long int hokuyo_start = laser.readTime(); - for (int i = 0; i < 10000; i++) - { - laser.sendCmd("TM1",timeout); - long long int hokuyo_time = laser.readTime() - hokuyo_start; - long long int pc_time = timeHelper() - pc_start; - printf("%lli %lli\n", hokuyo_time, pc_time); - fflush(stdout); - } - */ - /*int timeout = 1000; - for (int i = 0; i < 10; i++) - { - fprintf(stderr, "."); - laser.sendCmd("TM0",timeout); - laser.sendCmd("TM1",timeout); - long long int hokuyo_time = laser.readTime(); - long long int pc_time = timeHelper(); - laser.sendCmd("TM2",timeout); - - if (laser.requestScans(0, -1, 1, 0, 0, 1, timeout) != 0) - { - fprintf(stderr, "Error requesting scan.\n"); - return 1; - } - - hokuyo::LaserScan scan; - laser.serviceScan(scan, timeout); - long long int hokuyo_time2 = scan.self_time_stamp; - long long int pc_time2 = scan.system_time_stamp; - - printf("%lli %lli %lli %lli\n", hokuyo_time, pc_time, hokuyo_time2, pc_time2); - fflush(stdout); - }*/ - - //long long int initial_offset = getClockOffset(laser, 20); - //long long int end_offset = getClockOffset(laser, 20); - - /*while (true) - { - getDataOffset(laser, 1); - fflush(stdout); - } */ - - hokuyo::LaserScan scan_; - - laser.open(port); - while (true) - { - try { - //std::string status = laser.getStatus(); - //if (status == std::string("Sensor works well.")) - { - laser.laserOn(); - laser.requestScans(true, -2.3562, 2.3562, 0, 0); - //laser.serviceScan(scan_); - laser.serviceScan(scan_); - } - //else - // fprintf(stderr, "%s\n", laser.getStatus().c_str()); - } - catch (hokuyo::Exception e) - { - fprintf(stderr, "%s\n", e.what()); - } - try { - laser.stopScanning(); - } - catch (hokuyo::Exception e) - { - fprintf(stderr, "%s\n", e.what()); - } - //usleep(100000); - try { - //laser.close(); - } - catch (hokuyo::Exception e) - { - fprintf(stderr, "%s\n", e.what()); - } - } -} diff --git a/hokuyo_node/test/TODO b/hokuyo_node/test/TODO deleted file mode 100644 index d869a9a2..00000000 --- a/hokuyo_node/test/TODO +++ /dev/null @@ -1,3 +0,0 @@ -Need to check: -* Unplug/replug doesn't kill the driver. -* Starting up with the laser scanning doesn't cause problems. diff --git a/hokuyo_node/test/unplug_test.launch b/hokuyo_node/test/unplug_test.launch deleted file mode 100644 index e78634c7..00000000 --- a/hokuyo_node/test/unplug_test.launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/joystick_drivers/.travis.yml b/joystick_drivers/.travis.yml deleted file mode 100644 index 012180d4..00000000 --- a/joystick_drivers/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This config file for Travis CI utilizes ros-industrial/industrial_ci package. -# For more info for the package, see https://github.com/ros-industrial/industrial_ci/blob/master/README.rst -sudo: required -dist: trusty -services: - - docker -language: generic -compiler: - - gcc -notifications: - email: - recipients: - - gm130s@gmail.com - - jwhitley@autonomoustuff.com -env: - matrix: - - ROS_DISTRO="indigo" ROS_REPO=ros DOCKER_BASE_IMAGE=ros:indigo-ros-core - - ROS_DISTRO="indigo" ROS_REPO=ros-shadow-fixed DOCKER_BASE_IMAGE=ros:indigo-ros-core - - ROS_DISTRO="indigo" PRERELEASE=true - - ROS_DISTRO="kinetic" ROS_REPO=ros DOCKER_BASE_IMAGE=ros:kinetic-ros-core - - ROS_DISTRO="kinetic" ROS_REPO=ros-shadow-fixed DOCKER_BASE_IMAGE=ros:kinetic-ros-core - - ROS_DISTRO="kinetic" PRERELEASE=true - - ROS_DISTRO="lunar" ROS_REPO=ros DOCKER_BASE_IMAGE=ros:lunar-ros-core - - ROS_DISTRO="lunar" ROS_REPO=ros-shadow-fixed DOCKER_BASE_IMAGE=ros:lunar-ros-core - - ROS_DISTRO="lunar" PRERELEASE=true -matrix: - allow_failures: - - env: ROS_DISTRO="indigo" PRERELEASE=true - - env: ROS_DISTRO="kinetic" PRERELEASE=true - - env: ROS_DISTRO="lunar" PRERELEASE=true - -install: - - git clone https://github.com/ros-industrial/industrial_ci.git .industrial_ci -script: - - .industrial_ci/travis.sh diff --git a/joystick_drivers/joy/CHANGELOG.rst b/joystick_drivers/joy/CHANGELOG.rst deleted file mode 100644 index 3ef01a26..00000000 --- a/joystick_drivers/joy/CHANGELOG.rst +++ /dev/null @@ -1,30 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package joy -^^^^^^^^^^^^^^^^^^^^^^^^^ - -1.12.0 (2018-06-11) -------------------- -* Update timestamp when using autorepeat_rate -* Added dev_name parameter to select joystick by name -* Added Readme for joy package with description of new device name parameter -* Fixed numerous outstanding PRs. -* Added sticky buttons -* Changed package xml to format 2 -* Fixed issue when the joystick data did not got send until changed. -* Changed messaging to better reflect what the script is doing -* Contributors: Dino Hüllmann, Jonathan Bohren, Joshua Whitley, Miklos Marton, Naoki Mizuno, jprod123, psimona - -1.11.0 (2017-02-10) -------------------- -* fixed joy/Cmakelists for osx -* Update dependencies to remove warnings -* Contributors: Marynel Vazquez, Mark D Horn - -1.10.1 (2015-05-24) -------------------- -* Remove stray architechture_independent flags -* Contributors: Jonathan Bohren, Scott K Logan - -1.10.0 (2014-06-26) -------------------- -* First indigo release diff --git a/joystick_drivers/joy/CMakeLists.txt b/joystick_drivers/joy/CMakeLists.txt deleted file mode 100644 index 303559e5..00000000 --- a/joystick_drivers/joy/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html -cmake_minimum_required(VERSION 2.8.3) -project(joy) - -# Load catkin and all dependencies required for this package -set(CATKIN_DEPS roscpp diagnostic_updater sensor_msgs) -find_package(catkin REQUIRED ${CATKIN_DEPS}) -catkin_package(DEPENDS ${CATKIN_DEPS}) - -# Look for -include(CheckIncludeFiles) -check_include_files(linux/joystick.h HAVE_LINUX_JOYSTICK_H) - -if(HAVE_LINUX_JOYSTICK_H) - include_directories(msg/cpp ${catkin_INCLUDE_DIRS}) - add_executable(joy_node src/joy_node.cpp) - target_link_libraries(joy_node ${catkin_LIBRARIES}) -else(HAVE_LINUX_JOYSTICK_H) - message("Warning: no ; won't build joy node") -endif(HAVE_LINUX_JOYSTICK_H) - -#catkin_add_nosetests(test/test_joy_msg_migration.py) - -# Install targets -if(HAVE_LINUX_JOYSTICK_H) -install(TARGETS joy_node - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) -endif(HAVE_LINUX_JOYSTICK_H) - -install(DIRECTORY migration_rules - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} - ) diff --git a/joystick_drivers/joy/README.md b/joystick_drivers/joy/README.md deleted file mode 100644 index 5b3cd12f..00000000 --- a/joystick_drivers/joy/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# ROS Driver for Generic Linux Joysticks - -The joy package contains joy_node, a node that interfaces a generic Linux joystick to ROS. This node publishes a "Joy" message, which contains the current state of each one of the joystick's buttons and axes. - -## Supported Hardware - -This node should work with any joystick that is supported by Linux. - -## Published Topics - -* joy ([sensor_msgs/Joy](http://docs.ros.org/api/sensor_msgs/html/msg/Joy.html)): outputs the joystick state. - -## Device Selection - -There are two parameters controlling which device should be used: - -* ~dev (string, default: "/dev/input/js0") -* ~dev_name (string, default: "" (empty = disabled)) - -If ~dev_name is empty, ~dev defines the Linux joystick device from which to read joystick events. - -If ~dev_name is defined, the node enumerates all available joysticks, i.e. /dev/input/js*. The first joystick matching ~dev_name is opened. If no joystick matches the desired device name, the device specified by ~dev is used as a fallback. - -To get a list of the names of all connected joysticks, an invalid ~dev_name can be specified. For example: - -`rosrun joy joy_node _dev_name:="*"` - -The output might look like this: - -``` -[ INFO]: Found joystick: ST LIS3LV02DL Accelerometer (/dev/input/js1). -[ INFO]: Found joystick: Microsoft X-Box 360 pad (/dev/input/js0). -[ERROR]: Couldn't find a joystick with name *. Falling back to default device. -``` - -Then the node can be started with the device name given in the list. For example: - -`rosrun joy joy_node _dev_name:="Microsoft X-Box 360 pad"` - -## Advanced Parameters - -* ~deadzone (double, default: 0.05) - * Amount by which the joystick has to move before it is considered to be off-center. This parameter is specified relative to an axis normalized between -1 and 1. Thus, 0.1 means that the joystick has to move 10% of the way to the edge of an axis's range before that axis will output a non-zero value. Linux does its own deadzone processing, so in many cases this value can be set to zero. - -* ~autorepeat_rate (double, default: 0.0 (disabled)) - * Rate in Hz at which a joystick that has a non-changing state will resend the previously sent message. - -* ~coalesce_interval (double, default: 0.001) - * Axis events that are received within coalesce_interval (seconds) of each other are sent out in a single ROS message. Since the kernel sends each axis motion as a separate event, coalescing greatly reduces the rate at which messages are sent. This option can also be used to limit the rate of outgoing messages. Button events are always sent out immediately to avoid missing button presses. - -## Further Information - -For further information have a look at the [Wiki page](http://wiki.ros.org/joy). \ No newline at end of file diff --git a/joystick_drivers/joy/mainpage.dox b/joystick_drivers/joy/mainpage.dox deleted file mode 100644 index fb042432..00000000 --- a/joystick_drivers/joy/mainpage.dox +++ /dev/null @@ -1,56 +0,0 @@ -/** - -\mainpage -\htmlinclude manifest.html - -\b joy ROS joystick drivers for Linux. This package works with Logitech joysticks and PS3 SIXAXIS/DUALSHOCK devices. This package will only build is linux/joystick.h - -\section rosapi ROS API - -This package contains the message "Joy", which carries data from the joystick's axes and buttons. It also has the joy_node, which reads from a given joystick port and publishes "Joy" messages. - -List of nodes: -- \b joy_node - -Deprecated nodes: -- \b txjoy -- \b joy -The deprecated nodes are the same as the joy_node, but they will warn users when used. They are actually just bash scripts that call "joy_node" and print a warning. - -
- -\subsection joy joy - -\b joy ROS joystick driver for all linux joysticks. The driver will poll a given port until it can read from it, the publish Joy messages of the joystick state. If the port closes, or it reads an error, it will reopen the port. All axes are in the range [-1, 1], and all buttons are 0 (off) or 1 (on). - -Since the driver will poll for the joystick port, and automatically reopen the port if it's closed, the joy_node should be "on" whenever possible. It is typically part of the robot's launch file. - -\subsubsection autorepeat Auto-Repeat/Signal Loss - -The joy_node takes an "~autorepeat_rate" parameter. If the linux kernal receives no events during the autorepeat interval, it will automatically repeat the last value of the joystick. This is an important safety feature, and allows users to recover from a joystick that has timed out. - -\subsubsection usage Usage -\verbatim -$ joy [standard ROS args] -\endverbatim - -\subsubsection topic ROS topics - -Subscribes to (name / type): -- None - -Publishes to (name / type): -- \b "joy/Joy" : Joystick output. Axes are [-1, 1], buttons are 0 or 1 (depressed). - -\subsubsection parameters ROS parameters -- \b "~dev" : Input device for joystick. Default: /dev/input/js0 -- \b "~deadzone" : Output is zero for axis in deadzone. Range: [-0.9, 0.9]. Default 0.05 -- \b "~autorepeat_rate" : If no events, repeats last known state at this rate. Defualt: 0 (disabled) -- \b "~coalesce_interval" : Waits for this interval (seconds) after receiving an event. If multiple events happen in this interval, only one message will be sent. Reduces number of messages. Default: 0.001. - - -
- - - -*/ diff --git a/joystick_drivers/joy/migration_rules/Joy.bmr b/joystick_drivers/joy/migration_rules/Joy.bmr deleted file mode 100644 index ab78c215..00000000 --- a/joystick_drivers/joy/migration_rules/Joy.bmr +++ /dev/null @@ -1,43 +0,0 @@ -class update_joy_Joy_e3ef016fcdf22397038b36036c66f7c8(MessageUpdateRule): - old_type = "joy/Joy" - old_full_text = """ -float32[] axes -int32[] buttons -""" - - new_type = "sensor_msgs/Joy" - new_full_text = """ -# Reports the state of a joysticks axes and buttons. -Header header # timestamp in the header is the time the data is received from the joystick -float32[] axes # the axes measurements from a joystick -int32[] buttons # the buttons measurements from a joystick - -================================================================================ -MSG: std_msgs/Header -# Standard metadata for higher-level stamped data types. -# This is generally used to communicate timestamped data -# in a particular coordinate frame. -# -# sequence ID: consecutively increasing ID -uint32 seq -#Two-integer timestamp that is expressed as: -# * stamp.secs: seconds (stamp_secs) since epoch -# * stamp.nsecs: nanoseconds since stamp_secs -# time-handling sugar is provided by the client library -time stamp -#Frame this data is associated with -# 0: no frame -# 1: global frame -string frame_id -""" - - order = 0 - migrated_types = [] - - valid = True - - def update(self, old_msg, new_msg): - #No matching field name in old message - new_msg.header = self.get_new_class('Header')() - new_msg.axes = old_msg.axes - new_msg.buttons = old_msg.buttons diff --git a/joystick_drivers/joy/package.xml b/joystick_drivers/joy/package.xml deleted file mode 100644 index c34930f1..00000000 --- a/joystick_drivers/joy/package.xml +++ /dev/null @@ -1,36 +0,0 @@ - - joy - 1.12.0 - BSD - - - ROS driver for a generic Linux joystick. - The joy package contains joy_node, a node that interfaces a - generic Linux joystick to ROS. This node publishes a "Joy" - message, which contains the current state of each one of the - joystick's buttons and axes. - - - Jonathan Bohren - Morgan Quigley - Brian Gerkey - Kevin Watts - Blaise Gassend - - http://www.ros.org/wiki/joy - https://github.com/ros-drivers/joystick_drivers - https://github.com/ros-drivers/joystick_drivers/issues - - catkin - - roscpp - diagnostic_updater - sensor_msgs - joystick - - rosbag - - - - - diff --git a/joystick_drivers/joy/src/joy_node.cpp b/joystick_drivers/joy/src/joy_node.cpp deleted file mode 100644 index cbe6a4fc..00000000 --- a/joystick_drivers/joy/src/joy_node.cpp +++ /dev/null @@ -1,550 +0,0 @@ -/* - * teleop_pr2 - * Copyright (c) 2009, Willow Garage, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -//\author: Blaise Gassend - -#include -#include -#include -#include -#include -#include -#include -#include "ros/ros.h" -#include -#include -#include -#include - - -///\brief Opens, reads from and publishes joystick events -class Joystick -{ -private: - ros::NodeHandle nh_; - bool open_; - bool sticky_buttons_; - bool default_trig_val_; - std::string joy_dev_; - std::string joy_dev_name_; - std::string joy_def_ff_; - double deadzone_; - double autorepeat_rate_; // in Hz. 0 for no repeat. - double coalesce_interval_; // Defaults to 100 Hz rate limit. - int event_count_; - int pub_count_; - ros::Publisher pub_; - double lastDiagTime_; - - int ff_fd_; - struct ff_effect joy_effect_; - bool update_feedback_; - - diagnostic_updater::Updater diagnostic_; - - ///\brief Publishes diagnostics and status - void diagnostics(diagnostic_updater::DiagnosticStatusWrapper& stat) - { - double now = ros::Time::now().toSec(); - double interval = now - lastDiagTime_; - if (open_) - stat.summary(0, "OK"); - else - stat.summary(2, "Joystick not open."); - - stat.add("topic", pub_.getTopic()); - stat.add("device", joy_dev_); - stat.add("device name", joy_dev_name_); - stat.add("dead zone", deadzone_); - stat.add("autorepeat rate (Hz)", autorepeat_rate_); - stat.add("coalesce interval (s)", coalesce_interval_); - stat.add("recent joystick event rate (Hz)", event_count_ / interval); - stat.add("recent publication rate (Hz)", pub_count_ / interval); - stat.add("subscribers", pub_.getNumSubscribers()); - stat.add("default trig val", default_trig_val_); - stat.add("sticky buttons", sticky_buttons_); - event_count_ = 0; - pub_count_ = 0; - lastDiagTime_ = now; - } - - /*! \brief Returns the device path of the first joystick that matches joy_name. - * If no match is found, an empty string is returned. - */ - std::string get_dev_by_joy_name(const std::string& joy_name) - { - const char path[] = "/dev/input"; // no trailing / here - struct dirent *entry; - struct stat stat_buf; - - DIR *dev_dir = opendir(path); - if (dev_dir == NULL) - { - ROS_ERROR("Couldn't open %s. Error %i: %s.", path, errno, strerror(errno)); - return ""; - } - - while ((entry = readdir(dev_dir)) != NULL) - { - // filter entries - if (strncmp(entry->d_name, "js", 2) != 0) // skip device if it's not a joystick - continue; - std::string current_path = std::string(path) + "/" + entry->d_name; - if (stat(current_path.c_str(), &stat_buf) == -1) - continue; - if (!S_ISCHR(stat_buf.st_mode)) // input devices are character devices, skip other - continue; - - // get joystick name - int joy_fd = open(current_path.c_str(), O_RDONLY); - if (joy_fd == -1) - continue; - - char current_joy_name[128]; - if (ioctl(joy_fd, JSIOCGNAME(sizeof(current_joy_name)), current_joy_name) < 0) - strncpy(current_joy_name, "Unknown", sizeof(current_joy_name)); - - close(joy_fd); - - ROS_INFO("Found joystick: %s (%s).", current_joy_name, current_path.c_str()); - - if (strcmp(current_joy_name, joy_name.c_str()) == 0) - { - closedir(dev_dir); - return current_path; - } - } - - closedir(dev_dir); - return ""; - } - -public: - Joystick() : nh_(), diagnostic_(), ff_fd_(-1) - {} - - void set_feedback(const sensor_msgs::JoyFeedbackArray::ConstPtr& msg) - { - if (ff_fd_ == -1) - return;//we arent ready yet - - int size = msg->array.size(); - for (int i = 0; i < size; i++) - { - //process each feedback - if (msg->array[i].type == 1 && ff_fd_ != -1)//TYPE_RUMBLE - { - //if id is zero, thats low freq, 1 is high - joy_effect_.direction = 0;//down - joy_effect_.type = FF_RUMBLE; - if (msg->array[i].id == 0) - joy_effect_.u.rumble.strong_magnitude = ((float)(1<<15))*msg->array[i].intensity; - else - joy_effect_.u.rumble.weak_magnitude = ((float)(1<<15))*msg->array[i].intensity; - - joy_effect_.replay.length = 1000; - joy_effect_.replay.delay = 0; - - update_feedback_ = true; - } - } - } - - ///\brief Opens joystick port, reads from port and publishes while node is active - int main(int argc, char **argv) - { - diagnostic_.add("Joystick Driver Status", this, &Joystick::diagnostics); - diagnostic_.setHardwareID("none"); - - // Parameters - ros::NodeHandle nh_param("~"); - pub_ = nh_.advertise("joy", 1); - ros::Subscriber sub = nh_.subscribe("joy/set_feedback", 10, &Joystick::set_feedback, this); - nh_param.param("dev", joy_dev_, "/dev/input/js0"); - nh_param.param("dev_ff", joy_def_ff_, "/dev/input/by-id/usb-Sony_PLAYSTATION_R_3_Controller-event-joystick"); - nh_param.param("dev_name", joy_dev_name_, ""); - nh_param.param("deadzone", deadzone_, 0.05); - nh_param.param("autorepeat_rate", autorepeat_rate_, 0); - nh_param.param("coalesce_interval", coalesce_interval_, 0.001); - nh_param.param("default_trig_val",default_trig_val_,false); - nh_param.param("sticky_buttons", sticky_buttons_, false); - - // Checks on parameters - if (!joy_dev_name_.empty()) - { - std::string joy_dev_path = get_dev_by_joy_name(joy_dev_name_); - if (joy_dev_path.empty()) - { - ROS_ERROR("Couldn't find a joystick with name %s. Falling back to default device.", joy_dev_name_.c_str()); - } - else - { - ROS_INFO("Using %s as joystick device.", joy_dev_path.c_str()); - joy_dev_ = joy_dev_path; - } - } - - if (autorepeat_rate_ > 1 / coalesce_interval_) - { - ROS_WARN("joy_node: autorepeat_rate (%f Hz) > 1/coalesce_interval (%f Hz) does not make sense. Timing behavior is not well defined.", autorepeat_rate_, 1/coalesce_interval_); - } - - if (deadzone_ >= 1) - { - ROS_WARN("joy_node: deadzone greater than 1 was requested. The semantics of deadzone have changed. It is now related to the range [-1:1] instead of [-32767:32767]. For now I am dividing your deadzone by 32767, but this behavior is deprecated so you need to update your launch file."); - deadzone_ /= 32767; - } - - if (deadzone_ > 0.9) - { - ROS_WARN("joy_node: deadzone (%f) greater than 0.9, setting it to 0.9", deadzone_); - deadzone_ = 0.9; - } - - if (deadzone_ < 0) - { - ROS_WARN("joy_node: deadzone_ (%f) less than 0, setting to 0.", deadzone_); - deadzone_ = 0; - } - - if (autorepeat_rate_ < 0) - { - ROS_WARN("joy_node: autorepeat_rate (%f) less than 0, setting to 0.", autorepeat_rate_); - autorepeat_rate_ = 0; - } - - if (coalesce_interval_ < 0) - { - ROS_WARN("joy_node: coalesce_interval (%f) less than 0, setting to 0.", coalesce_interval_); - coalesce_interval_ = 0; - } - - // Parameter conversions - double autorepeat_interval = 1 / autorepeat_rate_; - double scale = -1. / (1. - deadzone_) / 32767.; - double unscaled_deadzone = 32767. * deadzone_; - - js_event event; - struct timeval tv; - fd_set set; - int joy_fd; - event_count_ = 0; - pub_count_ = 0; - lastDiagTime_ = ros::Time::now().toSec(); - - // Big while loop opens, publishes - while (nh_.ok()) - { - open_ = false; - diagnostic_.force_update(); - bool first_fault = true; - while (true) - { - ros::spinOnce(); - if (!nh_.ok()) - goto cleanup; - joy_fd = open(joy_dev_.c_str(), O_RDONLY); - if (joy_fd != -1) - { - // There seems to be a bug in the driver or something where the - // initial events that are to define the initial state of the - // joystick are not the values of the joystick when it was opened - // but rather the values of the joystick when it was last closed. - // Opening then closing and opening again is a hack to get more - // accurate initial state data. - close(joy_fd); - joy_fd = open(joy_dev_.c_str(), O_RDONLY); - } - if (joy_fd != -1) - break; - if (first_fault) - { - ROS_ERROR("Couldn't open joystick %s. Will retry every second.", joy_dev_.c_str()); - first_fault = false; - } - sleep(1.0); - diagnostic_.update(); - } - - if (joy_def_ff_.length()) - { - ff_fd_ = open(joy_def_ff_.c_str(), O_RDWR); - - /* Set the gain of the device*/ - int gain = 100; /* between 0 and 100 */ - struct input_event ie; /* structure used to communicate with the driver */ - - ie.type = EV_FF; - ie.code = FF_GAIN; - ie.value = 0xFFFFUL * gain / 100; - - if (write(ff_fd_, &ie, sizeof(ie)) == -1) - ROS_ERROR("Couldn't open joystick force feedback!");//perror("set gain"); - - joy_effect_.id = -1;//0; - joy_effect_.direction = 0;//down - joy_effect_.type = FF_RUMBLE; - joy_effect_.u.rumble.strong_magnitude = 0; - joy_effect_.u.rumble.weak_magnitude = 0; - joy_effect_.replay.length = 1000; - joy_effect_.replay.delay = 0; - - //upload the effect - int ret = ioctl(ff_fd_, EVIOCSFF, &joy_effect_); - } - - ROS_INFO("Opened joystick: %s. deadzone_: %f.", joy_dev_.c_str(), deadzone_); - open_ = true; - diagnostic_.force_update(); - - bool tv_set = false; - bool publication_pending = false; - tv.tv_sec = 1; - tv.tv_usec = 0; - sensor_msgs::Joy joy_msg; // Here because we want to reset it on device close. - double val; //Temporary variable to hold event values - sensor_msgs::Joy last_published_joy_msg; // used for sticky buttons option - sensor_msgs::Joy sticky_buttons_joy_msg; // used for sticky buttons option - while (nh_.ok()) - { - ros::spinOnce(); - - bool publish_now = false; - bool publish_soon = false; - FD_ZERO(&set); - FD_SET(joy_fd, &set); - - //ROS_INFO("Select..."); - int select_out = select(joy_fd+1, &set, NULL, NULL, &tv); - //ROS_INFO("Tick..."); - if (select_out == -1) - { - tv.tv_sec = 0; - tv.tv_usec = 0; - //ROS_INFO("Select returned negative. %i", ros::isShuttingDown()); - continue; - //break; // Joystick is probably closed. Not sure if this case is useful. - } - - //play the rumble effect (can probably do this at lower rate later) - if (ff_fd_ != -1) - { - struct input_event start; - start.type = EV_FF; - start.code = joy_effect_.id; - start.value = 3; - if (write(ff_fd_, (const void*) &start, sizeof(start)) == -1) - break;//fd closed - - //upload the effect - if (update_feedback_ == true) - { - int ret = ioctl(ff_fd_, EVIOCSFF, &joy_effect_); - update_feedback_ = false; - } - } - - if (FD_ISSET(joy_fd, &set)) - { - if (read(joy_fd, &event, sizeof(js_event)) == -1 && errno != EAGAIN) - break; // Joystick is probably closed. Definitely occurs. - - //ROS_INFO("Read data..."); - joy_msg.header.stamp = ros::Time().now(); - event_count_++; - switch(event.type) - { - case JS_EVENT_BUTTON: - case JS_EVENT_BUTTON | JS_EVENT_INIT: - if(event.number >= joy_msg.buttons.size()) - { - int old_size = joy_msg.buttons.size(); - joy_msg.buttons.resize(event.number+1); - last_published_joy_msg.buttons.resize(event.number+1); - sticky_buttons_joy_msg.buttons.resize(event.number+1); - for(unsigned int i=old_size;i= joy_msg.axes.size()) - { - int old_size = joy_msg.axes.size(); - joy_msg.axes.resize(event.number+1); - last_published_joy_msg.axes.resize(event.number+1); - sticky_buttons_joy_msg.axes.resize(event.number+1); - for(unsigned int i=old_size;i unscaled_deadzone) - val -= unscaled_deadzone; - else if (val < -unscaled_deadzone) - val += unscaled_deadzone; - else - val = 0; - joy_msg.axes[event.number] = val * scale; - // Will wait a bit before sending to try to combine events. - publish_soon = true; - break; - } - else - { - if (!(event.type & JS_EVENT_INIT)) - { - val = event.value; - if(val > unscaled_deadzone) - val -= unscaled_deadzone; - else if(val < -unscaled_deadzone) - val += unscaled_deadzone; - else - val=0; - joy_msg.axes[event.number]= val * scale; - } - - publish_soon = true; - break; - default: - ROS_WARN("joy_node: Unknown event type. Please file a ticket. time=%u, value=%d, type=%Xh, number=%d", event.time, event.value, event.type, event.number); - break; - } - } - } - else if (tv_set) // Assume that the timer has expired. - { - joy_msg.header.stamp = ros::Time().now(); - publish_now = true; - } - - if (publish_now) { - // Assume that all the JS_EVENT_INIT messages have arrived already. - // This should be the case as the kernel sends them along as soon as - // the device opens. - //ROS_INFO("Publish..."); - if (sticky_buttons_ == true) { - // cycle through buttons - for (size_t i = 0; i < joy_msg.buttons.size(); i++) { - // change button state only on transition from 0 to 1 - if (joy_msg.buttons[i] == 1 && last_published_joy_msg.buttons[i] == 0) { - sticky_buttons_joy_msg.buttons[i] = sticky_buttons_joy_msg.buttons[i] ? 0 : 1; - } else { - // do not change the message sate - //sticky_buttons_joy_msg.buttons[i] = sticky_buttons_joy_msg.buttons[i] ? 0 : 1; - } - } - // update last published message - last_published_joy_msg = joy_msg; - // fill rest of sticky_buttons_joy_msg (time stamps, axes, etc) - sticky_buttons_joy_msg.header.stamp.nsec = joy_msg.header.stamp.nsec; - sticky_buttons_joy_msg.header.stamp.sec = joy_msg.header.stamp.sec; - sticky_buttons_joy_msg.header.frame_id = joy_msg.header.frame_id; - for(size_t i=0; i < joy_msg.axes.size(); i++){ - sticky_buttons_joy_msg.axes[i] = joy_msg.axes[i]; - } - pub_.publish(sticky_buttons_joy_msg); - } else { - joy_msg.header.stamp = ros::Time().now(); - pub_.publish(joy_msg); - } - - publish_now = false; - tv_set = false; - publication_pending = false; - publish_soon = false; - pub_count_++; - } - - // If an axis event occurred, start a timer to combine with other - // events. - if (!publication_pending && publish_soon) - { - tv.tv_sec = trunc(coalesce_interval_); - tv.tv_usec = (coalesce_interval_ - tv.tv_sec) * 1e6; - publication_pending = true; - tv_set = true; - //ROS_INFO("Pub pending..."); - } - - // If nothing is going on, start a timer to do autorepeat. - if (!tv_set && autorepeat_rate_ > 0) - { - tv.tv_sec = trunc(autorepeat_interval); - tv.tv_usec = (autorepeat_interval - tv.tv_sec) * 1e6; - tv_set = true; - //ROS_INFO("Autorepeat pending... %li %li", tv.tv_sec, tv.tv_usec); - } - - if (!tv_set) - { - tv.tv_sec = 1; - tv.tv_usec = 0; - } - - diagnostic_.update(); - } // End of joystick open loop. - - close(ff_fd_); - close(joy_fd); - ros::spinOnce(); - if (nh_.ok()) - { - ROS_ERROR("Connection to joystick device lost unexpectedly. Will reopen."); - } - } - - cleanup: - ROS_INFO("joy_node shut down."); - - return 0; - } -}; - -int main(int argc, char **argv) -{ - ros::init(argc, argv, "joy_node"); - Joystick j; - return j.main(argc, argv); -} diff --git a/joystick_drivers/joy/test/saved/Joy.saved b/joystick_drivers/joy/test/saved/Joy.saved deleted file mode 100644 index 6d3e76cb..00000000 --- a/joystick_drivers/joy/test/saved/Joy.saved +++ /dev/null @@ -1,5 +0,0 @@ -[joy/Joy]: -float32[] axes -int32[] buttons - - diff --git a/joystick_drivers/joy/test/test_joy_msg_migration.py b/joystick_drivers/joy/test/test_joy_msg_migration.py deleted file mode 100755 index 2b9cca32..00000000 --- a/joystick_drivers/joy/test/test_joy_msg_migration.py +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env python -# Software License Agreement (BSD License) -# -# Copyright (c) 2008, Willow Garage, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -import roslib -roslib.load_manifest('joy') - -import sys -import struct - -import unittest - -import rostest -import rosbag -import rosbagmigration - -import re -from cStringIO import StringIO -import os - -import rospy - - - -migrator = rosbagmigration.MessageMigrator() - - -def repack(x): - return struct.unpack(' - joystick_drivers - 1.12.0 - BSD - - - This metapackage depends on packages for interfacing common - joysticks and human input devices with ROS. - - - http://www.ros.org/wiki/joystick_drivers - https://github.com/ros-drivers/joystick_drivers - https://github.com/ros-drivers/joystick_drivers/issues - - Jonathan Bohren - - catkin - - joy - ps3joy - spacenav_node - wiimote - - - - -
diff --git a/racecar/racecar-vm.rosinstall b/racecar/racecar-vm.rosinstall deleted file mode 100755 index 589571d1..00000000 --- a/racecar/racecar-vm.rosinstall +++ /dev/null @@ -1,4 +0,0 @@ -- setup-file: {local-name: /opt/ros/kinetic/setup.sh} -- git: {local-name: src/racecar, version: master, uri: 'https://github.com/mit-racecar/racecar.git'} -- git: {local-name: src/vesc, version: master, uri: 'https://github.com/mit-racecar/vesc.git'} -- git: {local-name: src/racecar-simulator, version: master, uri: 'https://github.com/mit-racecar/racecar-simulator.git'} diff --git a/racecar/racecar.rosinstall b/racecar/racecar.rosinstall deleted file mode 100755 index 9316d367..00000000 --- a/racecar/racecar.rosinstall +++ /dev/null @@ -1,4 +0,0 @@ -- setup-file: {local-name: /opt/ros/kinetic/setup.sh} -- git: {local-name: src/racecar, version: master, uri: 'https://github.com/mit-racecar/racecar.git'} -- git: {local-name: src/vesc, version: master, uri: 'https://github.com/mit-racecar/vesc.git'} -- git: {local-name: src/zed_wrapper, version: 6c06bb0a3c32aa2dec4a539e296f6ee1d6937518, uri: 'https://github.com/stereolabs/zed-ros-wrapper.git'} diff --git a/racecar/racecar/CMakeLists.txt b/racecar/racecar/CMakeLists.txt deleted file mode 100644 index e05dafc8..00000000 --- a/racecar/racecar/CMakeLists.txt +++ /dev/null @@ -1,176 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(racecar) - -## Find catkin macros and libraries -## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) -## is used, also find other catkin packages -find_package(catkin REQUIRED) - -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) - - -## Uncomment this if the package has a setup.py. This macro ensures -## modules and global scripts declared therein get installed -## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html -# catkin_python_setup() - -################################################ -## Declare ROS messages, services and actions ## -################################################ - -## To declare and build messages, services or actions from within this -## package, follow these steps: -## * Let MSG_DEP_SET be the set of packages whose message types you use in -## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). -## * In the file package.xml: -## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET -## * If MSG_DEP_SET isn't empty the following dependencies might have been -## pulled in transitively but can be declared for certainty nonetheless: -## * add a build_depend tag for "message_generation" -## * add a run_depend tag for "message_runtime" -## * In this file (CMakeLists.txt): -## * add "message_generation" and every package in MSG_DEP_SET to -## find_package(catkin REQUIRED COMPONENTS ...) -## * add "message_runtime" and every package in MSG_DEP_SET to -## catkin_package(CATKIN_DEPENDS ...) -## * uncomment the add_*_files sections below as needed -## and list every .msg/.srv/.action file to be processed -## * uncomment the generate_messages entry below -## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) - -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) - -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) - -## Generate actions in the 'action' folder -# add_action_files( -# FILES -# Action1.action -# Action2.action -# ) - -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs # Or other packages containing msgs -# ) - -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## INCLUDE_DIRS: uncomment this if you package contains header files -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need -catkin_package( -# INCLUDE_DIRS include -# LIBRARIES racecar_launch - CATKIN_DEPENDS - tf - tf2_ros - urg_node - joy - rosbag - rostopic - rviz - # specific to racecar-v1 - #pointgrey_camera_driver - #px4flow - #pwm_sysfs_driver - # specific to racecar-v2 - # mapping - gmapping - hector_mapping - robot_pose_ekf -# DEPENDS system_lib -) - -########### -## Build ## -########### - -## Specify additional locations of header files -## Your package locations should be listed before other locations -# include_directories(include) - -## Declare a cpp library -# add_library(racecar_launch -# src/${PROJECT_NAME}/racecar_launch.cpp -# ) - -## Declare a cpp executable -# add_executable(racecar_launch_node src/racecar_launch_node.cpp) - -## Add cmake target dependencies of the executable/library -## as an example, message headers may need to be generated before nodes -# add_dependencies(racecar_launch_node racecar_launch_generate_messages_cpp) - -## Specify libraries to link a library or executable target against -# target_link_libraries(racecar_launch_node -# ${catkin_LIBRARIES} -# ) - -############# -## Install ## -############# - -# all install targets should use catkin DESTINATION variables -# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html - -## Mark executable scripts (Python etc.) for installation -## in contrast to setup.py, you can choose the destination -# install(PROGRAMS -# scripts/my_python_script -# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark executables and/or libraries for installation -# install(TARGETS racecar_launch racecar_launch_node -# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark cpp header files for installation -# install(DIRECTORY include/${PROJECT_NAME}/ -# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -# FILES_MATCHING PATTERN "*.h" -# PATTERN ".svn" EXCLUDE -# ) - -## Mark other files for installation (e.g. launch and bag files, etc.) -# install(FILES -# # myfile1 -# # myfile2 -# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -# ) - -install(DIRECTORY launch - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) - -############# -## Testing ## -############# - -## Add gtest based cpp test target and link libraries -# catkin_add_gtest(${PROJECT_NAME}-test test/test_racecar_launch.cpp) -# if(TARGET ${PROJECT_NAME}-test) -# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) -# endif() - -## Add folders to be run by python nosetests -# catkin_add_nosetests(test) diff --git a/racecar/racecar/config/racecar-v2/sensors.yaml b/racecar/racecar/config/racecar-v2/sensors.yaml deleted file mode 100644 index 179f66c8..00000000 --- a/racecar/racecar/config/racecar-v2/sensors.yaml +++ /dev/null @@ -1,6 +0,0 @@ - -laser_node: - device: /dev/sensors/hokuyo - -imu_node: - device: /dev/imu diff --git a/racecar/racecar/config/racecar-v2/vesc_new.yaml b/racecar/racecar/config/racecar-v2/vesc_new.yaml deleted file mode 100644 index 74cdabec..00000000 --- a/racecar/racecar/config/racecar-v2/vesc_new.yaml +++ /dev/null @@ -1,38 +0,0 @@ - -# erpm (electrical rpm) = speed_to_erpm_gain * speed (meters / second) + speed_to_erpm_offset -speed_to_erpm_gain: 4614 -speed_to_erpm_offset: 0.0 - -tachometer_ticks_to_meters_gain: 0.00225 -# servo smoother - limits rotation speed and smooths anything above limit -max_servo_speed: 3.2 # radians/second -servo_smoother_rate: 75.0 # messages/sec - -# servo smoother - limits acceleration and smooths anything above limit -max_acceleration: 2.5 # meters/second^2 -throttle_smoother_rate: 75.0 # messages/sec - -# servo value (0 to 1) = steering_angle_to_servo_gain * steering angle (radians) + steering_angle_to_servo_offset -steering_angle_to_servo_gain: -1.2135 -steering_angle_to_servo_offset: 0.5304 - -# publish odom to base link tf -vesc_to_odom/publish_tf: false - -# car wheelbase is about 25cm -wheelbase: .25 - -vesc_driver: - port: /dev/ttyACM1 - duty_cycle_min: 0.0 - duty_cycle_max: 0.5 - current_min: 0.0 - current_max: 100.0 - brake_min: -20000.0 - brake_max: 200000.0 - speed_min: -33250 - speed_max: 33250 - position_min: 0.0 - position_max: 0.0 - servo_min: 0.15 - servo_max: 0.85 diff --git a/racecar/racecar/launch/includes/common/joy_teleop.launch.xml b/racecar/racecar/launch/includes/common/joy_teleop.launch.xml deleted file mode 100644 index adf05bf5..00000000 --- a/racecar/racecar/launch/includes/common/joy_teleop.launch.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/racecar/racecar/launch/includes/common/sensors.launch.xml b/racecar/racecar/launch/includes/common/sensors.launch.xml deleted file mode 100644 index 00caeac3..00000000 --- a/racecar/racecar/launch/includes/common/sensors.launch.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - diff --git a/racecar/racecar/launch/includes/racecar-v2-teleop.launch.xml b/racecar/racecar/launch/includes/racecar-v2-teleop.launch.xml deleted file mode 100644 index f59f9bac..00000000 --- a/racecar/racecar/launch/includes/racecar-v2-teleop.launch.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/racecar/racecar/launch/includes/racecar-v2/static_transforms.launch.xml b/racecar/racecar/launch/includes/racecar-v2/static_transforms.launch.xml deleted file mode 100644 index 7965af1a..00000000 --- a/racecar/racecar/launch/includes/racecar-v2/static_transforms.launch.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - diff --git a/racecar/racecar/launch/known_map_localization.launch b/racecar/racecar/launch/known_map_localization.launch deleted file mode 100644 index ba38829a..00000000 --- a/racecar/racecar/launch/known_map_localization.launch +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/racecar/racecar/launch/replay_bag_file/replay_bag_file.launch b/racecar/racecar/launch/replay_bag_file/replay_bag_file.launch deleted file mode 100644 index eabb32ef..00000000 --- a/racecar/racecar/launch/replay_bag_file/replay_bag_file.launch +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/racecar/racecar/launch/replay_bag_file/replay_bag_mapping.launch b/racecar/racecar/launch/replay_bag_file/replay_bag_mapping.launch deleted file mode 100644 index 0c7b05cb..00000000 --- a/racecar/racecar/launch/replay_bag_file/replay_bag_mapping.launch +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/racecar/racecar/launch/replay_bag_file/replay_bag_with_lidar_processing.launch b/racecar/racecar/launch/replay_bag_file/replay_bag_with_lidar_processing.launch deleted file mode 100644 index ef2b3f64..00000000 --- a/racecar/racecar/launch/replay_bag_file/replay_bag_with_lidar_processing.launch +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/racecar/racecar/launch/teleop.launch b/racecar/racecar/launch/teleop.launch deleted file mode 100644 index 217089e4..00000000 --- a/racecar/racecar/launch/teleop.launch +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/racecar/racecar/package.xml b/racecar/racecar/package.xml deleted file mode 100644 index 99295354..00000000 --- a/racecar/racecar/package.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - racecar - 0.0.1 - RACECAR launch scripts - - Michael Boulet - Michael Boulet - BSD - - - - - - catkin - - - - tf - tf2_ros - urg_node - joy - rosbag - rostopic - rviz - - - - - - - - - - gmapping - hector_mapping - robot_pose_ekf - - - - diff --git a/serial/CHANGELOG.rst b/serial/CHANGELOG.rst deleted file mode 100755 index ccd32f93..00000000 --- a/serial/CHANGELOG.rst +++ /dev/null @@ -1,85 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package serial -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -1.2.1 (2015-04-21) ------------------- -* Removed the use of a C++11 feature for compatibility with older browsers. -* Fixed an issue with cross compiling with mingw on Windows. -* Restructured Visual Studio project layout. -* Added include of ``#include `` on OS X (listing of ports). -* Fixed MXE for the listing of ports on Windows. -* Now closes file device if ``reconfigureDevice`` fails (Windows). -* Added the MARK/SPACE parity bit option, also made it optional. - Adding the enumeration values for MARK and SPACE was the only code change to an API header. - It should not affect ABI or API. -* Added support for 576000 baud on Linux. -* Now releases iterator properly in listing of ports code for OS X. -* Fixed the ability to open COM ports over COM10 on Windows. -* Fixed up some documentation about exceptions in ``serial.h``. - -1.2.0 (2014-07-02) ------------------- -* Removed vestigial ``read_cache_`` private member variable from Serial::Serial -* Fixed usage of scoped locks - Previously they were getting destroyed immediately because they were not stored in a temporary scope variable -* Added check of return value from close in Serial::SerialImpl::close () in unix.cc and win.cc -* Added ability to enumerate ports on linux and windows. - Updated serial_example.cc to show example of port enumeration. -* Fixed compile on VS2013 -* Added functions ``waitReadable`` and ``waitByteTimes`` with implemenations for Unix to support high performance reading -* Contributors: Christopher Baker, Craig Lilley, Konstantina Kastanara, Mike Purvis, William Woodall - -1.1.7 (2014-02-20) ------------------- -* Improved support for mingw (mxe.cc) -* Fix compilation warning - See issue `#53 `_ -* Improved timer handling in unix implementation -* fix broken ifdef _WIN32 -* Fix broken ioctl calls, add exception handling. -* Code guards for platform-specific implementations. (when not using cmake / catkin) -* Contributors: Christopher Baker, Mike Purvis, Nicolas Bigaouette, William Woodall, dawid - -1.1.6 (2013-10-17) ------------------- -* Move stopbits_one_point_five to the end of the enum, so that it doesn't alias with stopbits_two. - -1.1.5 (2013-09-23) ------------------- -* Fix license labeling, I put BSD, but the license has always been MIT... -* Added Microsoft Visual Studio 2010 project to make compiling on Windows easier. -* Implemented Serial::available() for Windows -* Update how custom baudrates are handled on OS X - This is taken from the example serial program on Apple's developer website, see: - http://free-pascal-general.1045716.n5.nabble.com/Non-standard-baud-rates-in-OS-X-IOSSIOSPEED-IOCTL-td4699923.html -* Timout settings are now applied by reconfigurePort -* Pass LPCWSTR to CreateFile in Windows impl -* Use wstring for ``port_`` type in Windows impl - -1.1.4 (2013-06-12 00:13:18 -0600) ---------------------------------- -* Timing calculation fix for read and write. - Fixes `#27 `_ -* Update list of exceptions thrown from constructor. -* fix, by Thomas Hoppe - For SerialException's: - * The name was misspelled... - * Use std::string's for error messages to prevent corruption of messages on some platforms -* alloca.h does not exist on OpenBSD either. - -1.1.3 (2013-01-09 10:54:34 -0800) ---------------------------------- -* Install headers - -1.1.2 (2012-12-14 14:08:55 -0800) ---------------------------------- -* Fix buildtool depends - -1.1.1 (2012-12-03) ------------------- -* Removed rt linking on OS X. Fixes `#24 `_. - -1.1.0 (2012-10-24) ------------------- -* Previous history is unstructured and therefore has been truncated. See the commit messages for more info. diff --git a/serial/CMakeLists.txt b/serial/CMakeLists.txt deleted file mode 100755 index d180df5f..00000000 --- a/serial/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(serial) - -# Find catkin -find_package(catkin REQUIRED) - -if(APPLE) - find_library(IOKIT_LIBRARY IOKit) - find_library(FOUNDATION_LIBRARY Foundation) -endif() - -if(UNIX AND NOT APPLE) - # If Linux, add rt and pthread - set(rt_LIBRARIES rt) - set(pthread_LIBRARIES pthread) - catkin_package( - LIBRARIES ${PROJECT_NAME} - INCLUDE_DIRS include - DEPENDS rt pthread - ) -else() - # Otherwise normal call - catkin_package( - LIBRARIES ${PROJECT_NAME} - INCLUDE_DIRS include - ) -endif() - -## Sources -set(serial_SRCS - src/serial.cc - include/serial/serial.h - include/serial/v8stdint.h -) -if(APPLE) - # If OSX - list(APPEND serial_SRCS src/impl/unix.cc) - list(APPEND serial_SRCS src/impl/list_ports/list_ports_osx.cc) -elseif(UNIX) - # If unix - list(APPEND serial_SRCS src/impl/unix.cc) - list(APPEND serial_SRCS src/impl/list_ports/list_ports_linux.cc) -else() - # If windows - list(APPEND serial_SRCS src/impl/win.cc) - list(APPEND serial_SRCS src/impl/list_ports/list_ports_win.cc) -endif() - -## Add serial library -add_library(${PROJECT_NAME} ${serial_SRCS}) -if(APPLE) - target_link_libraries(${PROJECT_NAME} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY}) -elseif(UNIX) - target_link_libraries(${PROJECT_NAME} rt pthread) -else() - target_link_libraries(${PROJECT_NAME} setupapi) -endif() - -## Uncomment for example -add_executable(serial_example examples/serial_example.cc) -add_dependencies(serial_example ${PROJECT_NAME}) -target_link_libraries(serial_example ${PROJECT_NAME}) - -## Include headers -include_directories(include) - -## Install executable -install(TARGETS ${PROJECT_NAME} - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -) - -## Install headers -install(FILES include/serial/serial.h include/serial/v8stdint.h - DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/serial) - -## Tests -if(CATKIN_ENABLE_TESTING) - add_subdirectory(tests) -endif() diff --git a/serial/Makefile b/serial/Makefile deleted file mode 100755 index e1720722..00000000 --- a/serial/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -all: serial - -CMAKE_FLAGS := -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -UNAME := $(shell uname -s) - -install_deps: -ifeq ($(UNAME),Darwin) - brew tap ros/deps - brew update - brew outdated boost || brew upgrade boost || brew install boost - brew outdated python || brew upgrade python || brew install python - sudo -H python2 -m pip install -U pip setuptools - sudo -H python2 -m pip install --force-reinstall --no-deps -U pip - sudo -H python2 -m pip install rosinstall_generator wstool rosdep empy catkin_pkg - sudo -H rosdep init - rosdep update - mkdir catkin_ws - cd catkin_ws && rosinstall_generator catkin --rosdistro hydro --tar > catkin.rosinstall - cd catkin_ws && wstool init src catkin.rosinstall - cd catkin_ws && rosdep install --from-paths src --ignore-src -y - cd catkin_ws && python2 ./src/catkin/bin/catkin_make -DPYTHON_EXECUTABLE=`which python2` install - echo "source catkin_ws/install/setup.bash" > setup.bash -else - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install ros-hydro-catkin libboost-dev - echo "source /opt/ros/hydro/setup.bash" > setup.bash -endif - -install: - cd build && make install - -serial: - @mkdir -p build - cd build && cmake $(CMAKE_FLAGS) .. -ifneq ($(MAKE),) - cd build && $(MAKE) -else - cd build && make -endif - -.PHONY: clean -clean: - rm -rf build - -.PHONY: doc -doc: - @doxygen doc/Doxyfile -ifeq ($(UNAME),Darwin) - @open doc/html/index.html -endif - -.PHONY: test -test: - @mkdir -p build - cd build && cmake $(CMAKE_FLAGS) .. -ifneq ($(MAKE),) - cd build && $(MAKE) run_tests -else - cd build && make run_tests -endif diff --git a/serial/README.md b/serial/README.md deleted file mode 100755 index 3f99507a..00000000 --- a/serial/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Serial Communication Library - -[![Build Status](https://travis-ci.org/wjwwood/serial.svg?branch=master)](https://travis-ci.org/wjwwood/serial)*(Linux and OS X)* [![Build Status](https://ci.appveyor.com/api/projects/status/github/wjwwood/serial)](https://ci.appveyor.com/project/wjwwood/serial)*(Windows)* - -This is a cross-platform library for interfacing with rs-232 serial like ports written in C++. It provides a modern C++ interface with a workflow designed to look and feel like PySerial, but with the speed and control provided by C++. - -This library is in use in several robotics related projects and can be built and installed to the OS like most unix libraries with make and then sudo make install, but because it is a catkin project it can also be built along side other catkin projects in a catkin workspace. - -Serial is a class that provides the basic interface common to serial libraries (open, close, read, write, etc..) and requires no extra dependencies. It also provides tight control over timeouts and control over handshaking lines. - -### Documentation - -Website: http://wjwwood.github.com/serial/ - -API Documentation: http://wjwwood.github.com/serial/doc/1.1.0/index.html - -### Dependencies - -Required: -* [catkin](http://www.ros.org/wiki/catkin) - cmake and Python based buildsystem -* [cmake](http://www.cmake.org) - buildsystem -* [Python](http://www.python.org) - scripting language - * [empy](http://www.alcyone.com/pyos/empy/) - Python templating library - * [catkin_pkg](http://pypi.python.org/pypi/catkin_pkg/) - Runtime Python library for catkin - -Optional (for tests): -* [Boost](http://www.boost.org/) - Boost C++ librairies - -Optional (for documentation): -* [Doxygen](http://www.doxygen.org/) - Documentation generation tool -* [graphviz](http://www.graphviz.org/) - Graph visualization software - -### Install - -Get the code: - - git clone https://github.com/wjwwood/serial.git - -Build: - - make - -Build and run the tests: - - make test - -Build the documentation: - - make doc - -Install: - - make install - -### License - -The MIT License - -Copyright (c) 2012 William Woodall, John Harrison - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -### Authors - -William Woodall -John Harrison - -### Contact - -William Woodall diff --git a/serial/changes.txt b/serial/changes.txt deleted file mode 100755 index ca14dae5..00000000 --- a/serial/changes.txt +++ /dev/null @@ -1,10 +0,0 @@ -# 1.1.0 10-24-2012 - -* Converted the build system to catkin - -# v1.0.1 8-27-2012 - -* Added baudrates: 1000000, 11520000, 2000000, 2500000, 3000000, 3500000, and 4000000 -* Linking related bug fixes on Linux and OS X -* Custom baudrate bug fix. Closes issue #18. - diff --git a/serial/doc/Doxyfile b/serial/doc/Doxyfile deleted file mode 100755 index 20bbe97f..00000000 --- a/serial/doc/Doxyfile +++ /dev/null @@ -1,2430 +0,0 @@ -# Doxyfile 1.8.11 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = serial - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 1.1.0 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Cross-platform, serial port library written in C++" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = doc/serial.dox \ - include \ - src \ - examples - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, -# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://www.mathjax.org/mathjax - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /