Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
U2IS
husky-ensta
Commits
2c8d64aa
Commit
2c8d64aa
authored
Dec 23, 2016
by
Paul Bovbel
Browse files
Move packages into monorepo for kinetic; strip out ur packages
parent
f9f10c8f
Changes
112
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
2c8d64aa
build/
bin/
lib/
msg_gen/
srv_gen/
msg/*Action.msg
msg/*ActionFeedback.msg
msg/*ActionGoal.msg
msg/*ActionResult.msg
msg/*Feedback.msg
msg/*Goal.msg
msg/*Result.msg
msg/_*.py
# Generated by dynamic reconfigure
*.cfgc
/cfg/cpp/
/cfg/*.py
# Ignore generated docs
*.dox
*.wikidoc
# eclipse stuff
.project
.cproject
# qcreator stuff
CMakeLists.txt.user
srv/_*.py
*.pcd
*.pyc
qtcreator-*
*.user
/planning/cfg
/planning/docs
/planning/src
*~
# Emacs
.#*
# Catkin custom files
CATKIN_IGNORE
*.pyc
README.md
View file @
2c8d64aa
...
...
@@ -8,8 +8,35 @@ real robot operation.
-
husky_description : Robot description (URDF)
-
husky_msgs : Message definitions
-
husky_navigation : Navigation configurations and demos
-
husky_ur5_moveit_config : MoveIt configuration and demos
For Husky instructions and tutorials, please see
[
Robots/Husky
](
http://wiki.ros.org/Robots/Husky
)
.
To create a custom Husky description or simulation, please fork
[
husky_customization
](
https://github.com/husky/husky_customization
)
.
husky_desktop
=============
Desktop ROS packages for the Clearpath Husky, which may pull in graphical dependencies.
-
husky_viz : Visualization (rviz) configuration and bringup
For Husky instructions and tutorials, please see http://wiki.ros.org/Robots/Husky
husky_robot
===========
Robot ROS packages for the Clearpath Husky, for operating robot hardware.
-
husky_bringup : Bringup launch files and scripts.
-
husky_base : Hardware driver for communicating with the onboard MCU.
For Husky instructions and tutorials, please see http://wiki.ros.org/Robots/Husky
husky_simualtor
==============
Simulator ROS packages for the Clearpath Husky.
-
husky_gazebo : Gazebo plugin definitions and extensions to the robot URDF.
For Husky instructions and tutorials, please see http://wiki.ros.org/Robots/Husky
husky_base/CHANGELOG.rst
0 → 100644
View file @
2c8d64aa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package husky_base
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.2.6 (2016-10-03)
------------------
* Adding support for the UM7 IMU.
* Contributors: Tony Baltovski
0.2.5 (2015-12-31)
------------------
* Fix absolute value to handle negative rollover readings effectively
* Another bitwise fix, now for x86.
* Formatting
* Fix length complement check.
There's a subtle difference in how ~ is implemented in aarch64 which
causes this check to fail. The new implementation should work on x86
and ARM.
* Contributors: Mike Purvis, Paul Bovbel
0.2.4 (2015-07-08)
------------------
0.2.3 (2015-04-08)
------------------
* Integrate husky_customization workflow
* Contributors: Paul Bovbel
0.2.2 (2015-03-23)
------------------
* Fix package urls
* Contributors: Paul Bovbel
0.2.1 (2015-03-23)
------------------
* Add missing dependencies
* Contributors: Paul Bovbel
0.2.0 (2015-03-23)
------------------
* Add UR5_ENABLED envvar
* Contributors: Paul Bovbel
0.1.5 (2015-02-19)
------------------
* Fix duration cast
* Contributors: Paul Bovbel
0.1.4 (2015-02-13)
------------------
* Correct issues with ROS time discontinuities - now using monotonic time source
* Implement a sane retry policy for communication with MCU
* Contributors: Paul Bovbel
0.1.3 (2015-01-30)
------------------
* Update description and maintainers
* Contributors: Paul Bovbel
0.1.2 (2015-01-20)
------------------
* Fix library install location
* Contributors: Paul Bovbel
0.1.1 (2015-01-13)
------------------
* Add missing description dependency
* Contributors: Paul Bovbel
0.1.0 (2015-01-12)
------------------
* Fixed encoder overflow issue
* Ported to ros_control for Indigo release
* Contributors: Mike Purvis, Paul Bovbel, finostro
0.0.5 (2013-10-04)
------------------
* Mark the config directory to install.
0.0.4 (2013-10-03)
------------------
* Parameterize husky port in env variable.
0.0.3 (2013-09-24)
------------------
* Add launchfile check.
* removing imu processing by dead_reckoning.py
* removing dynamic reconfigure from dead_reckoning because it was only there for handling gyro correction
* adding diagnostic aggregator and its related config file under config/diag_agg.yaml
0.0.2 (2013-09-11)
------------------
* Fix diagnostic_msgs dependency.
0.0.1 (2013-09-11)
------------------
* New husky_base package for Hydro, which contains the nodes
formerly in husky_bringup.
husky_base/CMakeLists.txt
0 → 100644
View file @
2c8d64aa
cmake_minimum_required
(
VERSION 2.8.3
)
project
(
husky_base
)
find_package
(
catkin REQUIRED COMPONENTS controller_manager hardware_interface husky_msgs
diagnostic_updater roslaunch roslint roscpp sensor_msgs
)
find_package
(
Boost REQUIRED COMPONENTS chrono
)
catkin_package
(
INCLUDE_DIRS include
LIBRARIES horizon_legacy
CATKIN_DEPENDS diagnostic_updater hardware_interface husky_msgs roscpp sensor_msgs
DEPENDS Boost
)
include_directories
(
include
${
Boost_INCLUDE_DIRS
}
${
catkin_INCLUDE_DIRS
}
)
add_library
(
horizon_legacy
src/horizon_legacy/crc.cpp
src/horizon_legacy/Logger.cpp
src/horizon_legacy/Message.cpp
src/horizon_legacy/Message_data.cpp
src/horizon_legacy/Message_request.cpp
src/horizon_legacy/Message_cmd.cpp
src/horizon_legacy/Transport.cpp
src/horizon_legacy/Number.cpp
src/horizon_legacy/linux_serial.cpp
)
add_executable
(
husky_node
src/husky_base.cpp
src/husky_hardware.cpp
src/husky_diagnostics.cpp
src/horizon_legacy_wrapper.cpp
)
target_link_libraries
(
husky_node horizon_legacy
${
catkin_LIBRARIES
}
${
Boost_LIBRARIES
}
)
add_dependencies
(
husky_node husky_msgs_gencpp
)
roslint_cpp
(
src/husky_base.cpp
src/husky_hardware.cpp
src/husky_diagnostics.cpp
include/husky_base/husky_diagnostics.h
include/husky_base/husky_hardware.h
)
roslaunch_add_file_check
(
launch
)
install
(
TARGETS horizon_legacy husky_node
RUNTIME DESTINATION
${
CATKIN_PACKAGE_BIN_DESTINATION
}
LIBRARY DESTINATION
${
CATKIN_PACKAGE_LIB_DESTINATION
}
ARCHIVE DESTINATION
${
CATKIN_PACKAGE_LIB_DESTINATION
}
)
install
(
DIRECTORY include/
${
PROJECT_NAME
}
/
DESTINATION
${
CATKIN_PACKAGE_INCLUDE_DESTINATION
}
)
install
(
DIRECTORY launch config
DESTINATION
${
CATKIN_PACKAGE_SHARE_DESTINATION
}
)
husky_base/config/diagnostics.yaml
0 → 100644
View file @
2c8d64aa
analyzers
:
husky
:
type
:
diagnostic_aggregator/GenericAnalyzer
path
:
Husky A200
find_and_remove_prefix
:
'
husky_base:
'
expected
:
[
'
husky_base:
power_status'
,
'
husky_base:
system_status'
,
'
husky_base:
safety_status'
,
'
husky_base:
software_status'
]
timeout
:
5.0
husky_base/include/husky_base/horizon_legacy/Exception.h
0 → 100644
View file @
2c8d64aa
/**
* _____
* / _ \
* / _/ \ \
* / / \_/ \
* / \_/ _ \ ___ _ ___ ___ ____ ____ ___ _____ _ _
* \ / \_/ \ / / _\| | | __| / _ \ | ++ \ | ++ \ / _ \ |_ _|| | | |
* \ \_/ \_/ / | | | | | ++ | |_| || ++ / | ++_/| |_| | | | | +-+ |
* \ \_/ / | |_ | |_ | ++ | _ || |\ \ | | | _ | | | | +-+ |
* \_____/ \___/|___||___||_| |_||_| \_\|_| |_| |_| |_| |_| |_|
* ROBOTICS™
*
* File: Exception.h
* Desc: Provides the clearpath::Exception class, which is the parent class
* for all clearpath exceptions.
* Auth: Iain Peet
*
* Copyright (c) 2010, Clearpath Robotics, 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 Clearpath Robotics, 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 CLEARPATH ROBOTICS, INC. 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.
*
* Please send comments, questions, or patches to skynet@clearpathrobotics.com
*
*/
#ifndef CPR_EXCEPTION_H
#define CPR_EXCEPTION_H
#include
<iostream>
namespace
clearpath
{
class
Exception
{
public:
const
char
*
message
;
protected:
Exception
(
const
char
*
msg
=
"none"
)
:
message
(
msg
)
{
}
};
};
// namespace clearpath
#endif // CPR_EXCEPTION_H
husky_base/include/husky_base/horizon_legacy/Logger.h
0 → 100644
View file @
2c8d64aa
/**
* _____
* / _ \
* / _/ \ \
* / / \_/ \
* / \_/ _ \ ___ _ ___ ___ ____ ____ ___ _____ _ _
* \ / \_/ \ / / _\| | | __| / _ \ | ++ \ | ++ \ / _ \ |_ _|| | | |
* \ \_/ \_/ / | | | | | ++ | |_| || ++ / | ++_/| |_| | | | | +-+ |
* \ \_/ / | |_ | |_ | ++ | _ || |\ \ | | | _ | | | | +-+ |
* \_____/ \___/|___||___||_| |_||_| \_\|_| |_| |_| |_| |_| |_|
* ROBOTICS™
*
* File: Logger.h
* Desc: Provides the Logger singleton which is used within the Clearpath API
* for log / trace message control
* Auth: Iain Peet
*
* Copyright (c) 2010, Clearpath Robotics, 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 Clearpath Robotics, 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 CLEARPATH ROBOTICS, INC. 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.
*
* Please send comments, questions, or patches to skynet@clearpathrobotics.com
*
*/
#ifndef CPR_LOGGER_H
#define CPR_LOGGER_H
#include
<iostream>
namespace
clearpath
{
class
Logger
{
private:
bool
enabled
;
int
level
;
std
::
ostream
*
stream
;
std
::
ofstream
*
nullStream
;
//i.e /dev/null
public:
enum
logLevels
{
ERROR_LEV
,
EXCEPTION
,
WARNING
,
INFO
,
DETAIL
};
static
const
char
*
levelNames
[];
// strings indexed by enumeration.
private:
Logger
();
~
Logger
();
void
close
();
public:
static
Logger
&
instance
();
std
::
ostream
&
entry
(
enum
logLevels
level
,
const
char
*
file
=
0
,
int
line
=
-
1
);
void
setEnabled
(
bool
enabled
);
void
setLevel
(
enum
logLevels
newLevel
);
void
setStream
(
std
::
ostream
*
stream
);
void
hookFatalSignals
();
friend
void
loggerTermHandler
(
int
signal
);
};
void
loggerTermHandler
(
int
signal
);
};
// namespace clearpath
// convenience macros
#define CPR_LOG(level) (clearpath::Logger::instance().entry((level), __FILE__, __LINE__ ))
#define CPR_ERR() CPR_LOG(clearpath::Logger::ERROR)
#define CPR_EXCEPT() (clearpath::Logger::instance().entry(clearpath::Logger::EXCEPTION))
#define CPR_WARN() CPR_LOG(clearpath::Logger::WARNING)
#define CPR_INFO() CPR_LOG(clearpath::Logger::INFO)
#define CPR_DTL() CPR_LOG(clearpath::Logger::DETAIL)
#endif //CPR_LOGGER_H
husky_base/include/husky_base/horizon_legacy/Message.h
0 → 100644
View file @
2c8d64aa
/**
* _____
* / _ \
* / _/ \ \
* / / \_/ \
* / \_/ _ \ ___ _ ___ ___ ____ ____ ___ _____ _ _
* \ / \_/ \ / / _\| | | __| / _ \ | ++ \ | ++ \ / _ \ |_ _|| | | |
* \ \_/ \_/ / | | | | | ++ | |_| || ++ / | ++_/| |_| | | | | +-+ |
* \ \_/ / | |_ | |_ | ++ | _ || |\ \ | | | _ | | | | +-+ |
* \_____/ \___/|___||___||_| |_||_| \_\|_| |_| |_| |_| |_| |_|
* ROBOTICS�
*
* File: Message.h
* Desc: Definition for the Message class. This class represents a
* single message which is sent or received from a platform
* Auth: R. Gariepy, Iain Peet
*
* Copyright (c) 2010, Clearpath Robotics, 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 Clearpath Robotics, 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 CLEARPATH ROBOTICS, INC. 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.
*
* Please send comments, questions, or patches to skynet@clearpathrobotics.com
*
*/
#ifndef CLEARPATH_MESSAGE_H
#define CLEARPATH_MESSAGE_H
#include
<iostream>
#include
<cstdlib>
#include
<stdint.h>
#include
"husky_base/horizon_legacy/Exception.h"
namespace
clearpath
{
class
MessageException
:
public
Exception
{
public:
enum
errors
{
ERROR_BASE
=
0
,
INVALID_LENGTH
};
public:
enum
errors
type
;
MessageException
(
const
char
*
msg
,
enum
errors
ex_type
=
ERROR_BASE
);
};
class
Message
{
public:
static
const
size_t
MAX_MSG_LENGTH
=
256
;
protected:
static
const
size_t
CRC_LENGTH
=
2
;
static
const
uint16_t
CRC_INIT_VAL
=
0xFFFF
;
static
const
size_t
HEADER_LENGTH
=
12
;
// Offsets of fields within data
enum
dataOffsets
{
SOH_OFST
=
0
,
LENGTH_OFST
,
LENGTH_COMP_OFST
,
VERSION_OFST
,
TIMESTAMP_OFST
,
FLAGS_OFST
=
8
,
TYPE_OFST
,
STX_OFST
=
11
,
PAYLOAD_OFST
};
uint8_t
data
[
MAX_MSG_LENGTH
];
// Total length (incl. full header & checksum)
size_t
total_len
;
// Whether this Message has ever been sent by the Transport()
// (Updated by Transport::send())
bool
is_sent
;
friend
class
Transport
;
// Allow Transport to read data and total_len directly
public:
static
const
size_t
MIN_MSG_LENGTH
=
HEADER_LENGTH
+
CRC_LENGTH
;
static
const
uint8_t
SOH
=
0xAA
;
static
const
uint8_t
STX
=
0x55
;
protected:
size_t
crcOffset
()
{
return
total_len
-
CRC_LENGTH
;
};
void
setLength
(
uint8_t
len
);
void
setVersion
(
uint8_t
version
);
void
setTimestamp
(
uint32_t
timestamp
);
void
setFlags
(
uint8_t
flags
);
void
setType
(
uint16_t
type
);
uint8_t
*
getPayloadPointer
(
size_t
offset
=
0
);
void
setPayload
(
void
*
buf
,
size_t
buf_size
);
void
setPayloadLength
(
uint8_t
len
);
void
makeValid
();
public:
Message
();
Message
(
void
*
input
,
size_t
msg_len
);
Message
(
const
Message
&
other
);
Message
(
uint16_t
type
,
uint8_t
*
payload
,
size_t
payload_len
,
uint32_t
timestamp
=
0
,
uint8_t
flags
=
0
,
uint8_t
version
=
0
);
virtual
~
Message
();
void
send
();
uint8_t
getLength
();
// as reported by packet length field.
uint8_t
getLengthComp
();
uint8_t
getVersion
();
uint32_t
getTimestamp
();
uint8_t
getFlags
();
uint16_t
getType
();
uint16_t
getChecksum
();
size_t
getPayloadLength
()
{
return
total_len
-
HEADER_LENGTH
-
CRC_LENGTH
;
}
size_t
getPayload
(
void
*
buf
,
size_t
max_size
);
size_t
getTotalLength
()
{
return
total_len
;
}
size_t
toBytes
(
void
*
buf
,
size_t
buf_size
);
bool
isValid
(
char
*
whyNot
=
NULL
,
size_t
strLen
=
0
);
bool
isCommand
()
{
return
getType
()
<
0x4000
;
}
bool
isRequest
()
{
return
(
getType
()
>=
0x4000
)
&&
(
getType
()
<
0x8000
);
}