Commit 056f0eea authored by CactusSoyeux's avatar CactusSoyeux
Browse files

Submodule delete

parent 1e8c05ea
<<<<<<< HEAD
"configurations": [
"browse": {
"databaseFilename": "${workspaceFolder}/.vscode/",
"limitSymbolsToIncludedHeaders": false
"includePath": [
"name": "ROS",
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu11",
"cppStandard": "c++14"
"version": 4
"configurations": [
"browse": {
"databaseFilename": "${workspaceFolder}/.vscode/",
"limitSymbolsToIncludedHeaders": false
"includePath": [
"name": "ROS",
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu11",
"cppStandard": "c++14"
"version": 4
>>>>>>> 30b6db2ff08529de6edde8cd9650818f0a861940
\ No newline at end of file
"python.autoComplete.extraPaths": [
<<<<<<< HEAD
"python.analysis.extraPaths": [
"C_Cpp.errorSquiggles": "Enable",
"files.associations": {
"string": "cpp",
"array": "cpp",
"string_view": "cpp"
"python.analysis.extraPaths": [
>>>>>>> 30b6db2ff08529de6edde8cd9650818f0a861940
\ No newline at end of file
# toplevel CMakeLists.txt for a catkin workspace
# catkin/cmake/toplevel.cmake
cmake_minimum_required(VERSION 3.0.2)
# search for catkin within the workspace
set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}")
execute_process(COMMAND ${_cmd}
if(NOT _res EQUAL 0 AND NOT _res EQUAL 2)
# searching fot catkin resulted in an error
string(REPLACE ";" " " _cmd_str "${_cmd}")
message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}")
# include catkin from workspace or via find_package()
if(_res EQUAL 0)
set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake")
# include all.cmake without add_subdirectory to let it operate in same scope
include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE)
# use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
# or CMAKE_PREFIX_PATH from the environment
if(NOT WIN32)
# list of catkin workspaces
set(catkin_search_path "")
foreach(path ${CMAKE_PREFIX_PATH})
if(EXISTS "${path}/.catkin")
list(FIND catkin_search_path ${path} _index)
if(_index EQUAL -1)
list(APPEND catkin_search_path ${path})
# search for catkin in all workspaces
find_package(catkin QUIET
PATHS ${catkin_search_path}
if(NOT catkin_FOUND)
message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS was sourced before.")
cohoma_hmi @ 5aa3e9f2
Subproject commit 5aa3e9f20e6687474abb033618863a6c3c861e23
geonav_transform @ 8894342c
Subproject commit 8894342ca6821514f5401ccf63516041d07e44b5
Changelog for package joy
1.15.1 (2021-06-07)
1.15.0 (2020-10-12)
* Added autodetection for force-feedback devices. (`#169 <>`_)
* Added autodetection for force-feedback devices.
* RAII for closedir
* joy: Little fixes for force feedback. (`#167 <>`_)
This commit increases the maximum magnitude of the FF effects to double the previous maximum.
* Print out joystick name on initialization. (`#168 <>`_)
This helps figuring out what string to give to the `dev_name` parameter.
* Contributors: Martin Pecka
1.14.0 (2020-07-07)
* frame_id in the header of the joystick msg (`#166 <>`_)
* roslint and Generic Clean-Up (`#161 <>`_)
* Merge pull request `#158 <>`_ from clalancette/ros1-cleanups
ROS1 joy cleanups
* Greatly simplify the sticky_buttons support.
* Small fixes to rumble support.
* Use C++ style casts.
* Use empty instead of length.
* joy_def_ff -> joy_dev_ff
* Cleanup header includes.
* Use size_t appropriately.
* NULL -> nullptr everywhere.
* Style cleanup in joy_node.cpp.
* Merge pull request `#154 <>`_ from zchen24/master
Minor: moved default to right indent level
* Contributors: Chris Lalancette, Joshua Whitley, Mamoun Gharbi, Zihan Chen
1.13.0 (2019-06-24)
* Merge pull request `#120 <>`_ from furushchev/remap
add joy_remap and its sample
* Merge pull request `#128 <>`_ from ros-drivers/fix/tab_errors
Cleaning up Python indentation.
* Merge pull request `#111 <>`_ from matt-attack/indigo-devel
Add Basic Force Feedback Support
* Merge pull request `#126 <>`_ from clalancette/minor-formatting
* Put brackets around ROS\_* macros.
In some circumstances they may be defined to empty, so we need
to have brackets to ensure that they are syntactically valid.
Signed-off-by: Chris Lalancette <>
* Merge pull request `#122 <>`_ from lbucklandAS/fix-publish-timestamp
Add timestamp to all joy messages
* Change error messages and set ps3 as default controller
* Better handle device loss
Allow for loss and redetection of device with force feedback
* Add basic force feedback over usb
Addresses `#89 <>`_
* Contributors: Chris Lalancette, Furushchev, Joshua Whitley, Lucas Buckland, Matthew, Matthew Bries
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
cmake_minimum_required(VERSION 3.5)
# Load catkin and all dependencies required for this package
set(CATKIN_DEPS roscpp diagnostic_updater sensor_msgs roslint)
find_package(catkin REQUIRED ${CATKIN_DEPS})
catkin_package(DEPENDS sensor_msgs)
# Look for <linux/joystick.h>
check_include_files(linux/joystick.h 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})
# Install targets
install(TARGETS joy_node
message("Warning: no <linux/joystick.h>; won't build joy node")
install(DIRECTORY migration_rules scripts config launch
# 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]( 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](
\ No newline at end of file
- axes[0]
- axes[1]
- axes[2]
- axes[5]
- axes[6] * 2.0
- axes[7] * 2.0
- axes[8] * -2.0
- 0.0
- max(axes[10], 0.0) * -1.0
- min(axes[9], 0.0)
- min(axes[10], 0.0)
- max(axes[9], 0.0) * -1.0
- (axes[3] - 1.0) * 0.5
- (axes[4] - 1.0) * 0.5
- buttons[4] * -1.0
- buttons[5] * -1.0
- buttons[3] * -1.0
- buttons[2] * -1.0
- buttons[1] * -1.0
- buttons[0] * -1.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- buttons[8]
- buttons[10]
- buttons[11]
- buttons[9]
- max(axes[10], 0.0)
- min(axes[9], 0.0) * -1.0
- min(axes[10], 0.0) * -1.0
- max(axes[9], 0.0)
- buttons[6]
- buttons[7]
- buttons[4]
- buttons[5]
- buttons[3]
- buttons[2]
- buttons[1]
- buttons[0]
- buttons[12]
<!-- assumes ds4drv is running -->
<node name="joy_node" pkg="joy" type="joy_node">
<remap from="joy" to="joy_orig"/>
<!-- remap joy to emulate ps3joy mappings -->
<node name="joy_remap" pkg="joy" type="">
<remap from="joy_in" to="joy_orig"/>
<remap from="joy_out" to="joy"/>
<rosparam command="load" file="$(find joy)/config/ps4joy.yaml"/>
\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
$ joy [standard ROS args]
\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.
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
<package format="2">
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.
<maintainer email="">Jonathan Bohren</maintainer>
<author>Morgan Quigley</author>
<author>Brian Gerkey</author>
<author>Kevin Watts</author>
<author>Blaise Gassend</author>
<url type="website"></url>
<url type="development"></url>
<url type="bugtracker"></url>
<rosbag migration_rule_file="migration_rules/Joy.bmr"/>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: furushchev <>
import ast
import operator as op
import rospy
import traceback
from sensor_msgs.msg import Joy
class RestrictedEvaluator(object):
def __init__(self):
self.operators = {
ast.Add: op.add,
ast.Sub: op.sub,
ast.Mult: op.mul,
ast.Div: op.truediv,
ast.BitXor: op.xor,
ast.USub: op.neg,
self.functions = {
'abs': lambda x: abs(x),
'max': lambda *x: max(*x),
'min': lambda *x: min(*x),
def _reval_impl(self, node, variables):
if isinstance(node, ast.Num):
return node.n
elif isinstance(node, ast.BinOp):
op = self.operators[type(node.op)]
return op(self._reval_impl(node.left, variables),
self._reval_impl(node.right, variables))
elif isinstance(node, ast.UnaryOp):
op = self.operators[type(node.op)]
return op(self._reval_impl(node.operand, variables))
elif isinstance(node, ast.Call) and in self.functions:
func = self.functions[]
args = [self._reval_impl(n, variables) for n in node.args]
return func(*args)
elif isinstance(node, ast.Name) and in variables:
return variables[]
elif isinstance(node, ast.Subscript) and in variables:
var = variables[]
idx = node.slice.value.n
return var[idx]
except IndexError:
raise IndexError("Variable '%s' out of range: %d >= %d" % (, idx, len(var)))
raise TypeError("Unsupported operation: %s" % node)
def reval(self, expr, variables):
expr = str(expr)
if len(expr) > 1000:
raise ValueError("The length of an expression must not be more than 1000 characters")
return self._reval_impl(ast.parse(expr, mode='eval').body, variables)
except Exception as e:
raise e
class JoyRemap(object):
def __init__(self):
self.evaluator = RestrictedEvaluator()
self.mappings = self.load_mappings("~mappings")
self.warn_remap("joy_out") = rospy.Publisher(
"joy_out", Joy, queue_size=1)
self.sub = rospy.Subscriber(
"joy_in", Joy, self.callback,
queue_size=rospy.get_param("~queue_size", None))
def load_mappings(self, ns):
btn_remap = rospy.get_param(ns + "/buttons", [])
axes_remap = rospy.get_param(ns + "/axes", [])
rospy.loginfo("loaded remapping: %d buttons, %d axes" % (len(btn_remap), len(axes_remap)))
return {"buttons": btn_remap, "axes": axes_remap}
def warn_remap(self, name):
if name == rospy.remap_name(name):
rospy.logwarn("topic '%s' is not remapped" % name)
def callback(self, in_msg):
out_msg = Joy(header=in_msg.header)
map_axes = self.mappings["axes"]
map_btns = self.mappings["buttons"]
out_msg.axes = [0.0] * len(map_axes)
out_msg.buttons = [0] * len(map_btns)
in_dic = {"axes": in_msg.axes, "buttons": in_msg.buttons}