Skip to content

Commit e70fab8

Browse files
committed
Merge branch 'fusion_attempt'
2 parents 20167d0 + ed3762a commit e70fab8

13 files changed

+167
-63
lines changed

.travis.yml

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,42 @@
1-
branches:
2-
only:
3-
- master
1+
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
2+
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)
43

54
notifications:
6-
on_success: never
7-
on_failure: never
8-
9-
os :
10-
- linux
11-
12-
dist:
13-
- trusty
14-
15-
sudo:
16-
- required
17-
18-
19-
language:
20-
- generic
21-
5+
email:
6+
if: branch = master
7+
on_success: change
8+
on_failure: always
229
services:
2310
- docker
2411

25-
matrix:
26-
include:
27-
- env: DOCKER_VERSION=indigo-desktop-trusty
28-
- env: DOCKER_VERSION=kinetic-desktop-xenial
29-
- env: DOCKER_VERSION=lunar-desktop-xenial
30-
- env: DOCKER_VERSION=lunar-desktop-stretch
12+
# include the following block if the C/C++ build artifacts should get cached by Travis,
13+
# CCACHE_DIR needs to get set as well to actually fill the cache
14+
cache:
15+
directories:
16+
- $HOME/.ccache
17+
18+
git:
19+
quiet: true # optional, silences the cloning of the target repository
3120

21+
# configure the build environment(s)
22+
# https://github.com/ros-industrial/industrial_ci/blob/master/doc/index.rst#variables-you-can-configure
3223
env:
33-
global:
34-
- CI_SOURCE_PATH=$(pwd)
24+
global: # global settings for all jobs
25+
- ROS_REPO=testing
26+
- CCACHE_DIR=$HOME/.ccache # enables C/C++ caching in industrial_ci
27+
matrix: # each line is a job
28+
- ROS_DISTRO="indigo"
29+
- ROS_DISTRO="kinetic"
30+
- ROS_DISTRO="melodic" OS_NAME=ubuntu OS_CODE_NAME=bionic
31+
- ROS_DISTRO="melodic" OS_NAME=debian OS_CODE_NAME=stretch
32+
33+
# allow failures, e.g. for unsupported distros
34+
matrix:
35+
allow_failures:
36+
- env: ROS_DISTRO="indigo"
3537

38+
# clone and run industrial_ci
3639
install:
37-
- sudo docker pull osrf/ros:$DOCKER_VERSION
38-
40+
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci -b master
3941
script:
40-
- sudo docker run -t -d --name=$DOCKER_VERSION -v $CI_SOURCE_PATH/../:/catkin_ws/src/ osrf/ros:$DOCKER_VERSION bash
41-
- sudo docker exec -i $DOCKER_VERSION apt-get update
42-
- sudo docker exec -i $DOCKER_VERSION rosdep install -i -y --from-paths /catkin_ws/src/naoqi_driver
43-
- sudo docker exec -i $DOCKER_VERSION bash -c 'source /opt/ros/*/setup.bash; catkin_make --directory catkin_ws/'
44-
- sudo docker exec -i $DOCKER_VERSION bash -c 'source /opt/ros/*/setup.bash; catkin_make run_tests --directory /catkin_ws/'
45-
46-
after_script:
47-
- sudo docker stop $DOCKER_VERSION
42+
- .industrial_ci/travis.sh

CHANGELOG.rst

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,67 @@
11
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2-
Changelog for package naoqi_rosbridge
2+
Changelog for package naoqi_driver
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
0.5.11 (2020-01-08)
6+
-------------------
7+
* Merge pull request `#129 <https://github.com/ros-naoqi/naoqi_driver/issues/129>`_ from Pandhariix/melodic_compatibility
8+
Melodic compatibility
9+
* Merge pull request `#126 <https://github.com/ros-naoqi/naoqi_driver/issues/126>`_ from Pandhariix/lasers_range
10+
Parametrizable range for Pepper's lasers
11+
* Merge pull request `#130 <https://github.com/ros-naoqi/naoqi_driver/issues/130>`_ from Pandhariix/melodic_ci
12+
Adapt the README to the new CI
13+
* Update CI, add melodic-stretch
14+
* Adapt the README to the new CI
15+
* Merge pull request `#128 <https://github.com/ros-naoqi/naoqi_driver/issues/128>`_ from ros-naoqi/use_ici
16+
use industrial_ci instead of custom CI
17+
* send emails only for builds on master branch
18+
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
19+
* use industrial_ci instead of custom CI
20+
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
21+
* Remove -Werror=deprecated-declarations to compile for melodic
22+
* Replace the joint and joint mimics boost shared pointers by urdf::JointMimicSharedPtr & urdf::JointSharedPtr
23+
* Include iostream to avoid cout not a member of std
24+
* Merge pull request `#127 <https://github.com/ros-naoqi/naoqi_driver/issues/127>`_ from ros-naoqi/remove_eol_lunar
25+
remove EOL ROS Lunar from travis config
26+
* remove lunar from readme as well
27+
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
28+
* remove EOL ROS Lunar from travis config
29+
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
30+
* Parametrizable range for Pepper's lasers. Default range, 0.1 to 3.0 meters
31+
* Merge pull request `#125 <https://github.com/ros-naoqi/naoqi_driver/issues/125>`_ from Pandhariix/indigo_ci
32+
Use std::numeric_limits<double>::quiet_NaN for indigo compatibility
33+
* Merge pull request `#124 <https://github.com/ros-naoqi/naoqi_driver/issues/124>`_ from ros-naoqi/fix_orocos
34+
upgrade to make sure all package versions are consistent
35+
* Replace std::nan to std::numeric_limits<double>::quiet_NaN for the indigo compatibility
36+
* upgrade to make sure all package versions are comsistent
37+
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
38+
* Merge pull request `#123 <https://github.com/ros-naoqi/naoqi_driver/issues/123>`_ from ros-naoqi/rosdep_eol
39+
pass rosdep eol flag
40+
* pass rosdep eol flag
41+
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
42+
* Merge pull request `#113 <https://github.com/ros-naoqi/naoqi_driver/issues/113>`_ from Pandhariix/master
43+
Add velocities and torques to the joint states
44+
* Changing the maintainer
45+
* Add velocities and torques to the joint states
46+
* Merge pull request `#112 <https://github.com/ros-naoqi/naoqi_driver/issues/112>`_ from Pandhariix/hotfix/indigo_compilation
47+
Fix compilation error for indigo
48+
* Fix compilation error for indigo
49+
* Merge pull request `#111 <https://github.com/ros-naoqi/naoqi_driver/issues/111>`_ from Pandhariix/feature/stereo
50+
Feature/stereo
51+
* Print the detected version of the robot
52+
* Update boot_config to take into account the stereo
53+
* Update naoqi_driver to take into account robots with stereo
54+
* Add methods handling the camera parameters for the stereo cameras and call them in the getCameraInfo method
55+
* Update the CameraConverter class to take the stereo into account
56+
* Add the isDepthStereo method to the driver helpers
57+
* Add the RGB Stereo and Depth Stereo parameters to the vision definitions
58+
* Merge pull request `#108 <https://github.com/ros-naoqi/naoqi_driver/issues/108>`_ from kochigami/add-initializing-message
59+
* add naoqi_driver initialized message
60+
* modify the message of service and subscriber registering process
61+
* modify message of service and subscriber registering process like others
62+
* add naoqi_driver initialized message
63+
* Contributors: Kanae Kochigami, Maxime Busy, Mikael Arguedas, Natalia Lyubova, Pandhariix, Séverin Lemaignan
64+
565
0.5.10 (2018-02-16)
666
-------------------
767
* disable logs as default (reference `#68 <https://github.com/ros-naoqi/naoqi_driver/issues/68>`_) (`#88 <https://github.com/ros-naoqi/naoqi_driver/issues/88>`_)

CMakeLists_catkin.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ add_definitions(-DLIBQI_VERSION=${naoqi_libqi_VERSION_MAJOR}${naoqi_libqi_VERSIO
3232

3333
catkin_package(LIBRARIES naoqi_driver_module naoqi_driver)
3434

35-
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
36-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=deprecated-declarations")
37-
endif()
38-
39-
include_directories( include ${catkin_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
35+
include_directories( include ${catkin_INCLUDE_DIRS})
4036

4137
# create the different libraries
4238
add_library(

README.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,22 @@ Travis - Continuous Integration
4646
:alt: Kinetic with Ubuntu Xenial
4747
:target: https://travis-ci.org/ros-naoqi/naoqi_driver/
4848

49-
.. |lunar| image:: https://travis-matrix-badges.herokuapp.com/repos/ros-naoqi/naoqi_driver/branches/master/3
50-
:alt: Lunar with Ubuntu Xenial
49+
.. |melodic| image:: https://travis-matrix-badges.herokuapp.com/repos/ros-naoqi/naoqi_driver/branches/master/3
50+
:alt: Melodic with Ubuntu Bionic
5151
:target: https://travis-ci.org/ros-naoqi/naoqi_driver/
5252

53-
.. |lunar_stretch| image:: https://travis-matrix-badges.herokuapp.com/repos/ros-naoqi/naoqi_driver/branches/master/4
54-
:alt: Lunar with Debian Stretch
53+
.. |melodic-stretch| image:: https://travis-matrix-badges.herokuapp.com/repos/ros-naoqi/naoqi_driver/branches/master/4
54+
:alt: Melodic with Debian Stretch
5555
:target: https://travis-ci.org/ros-naoqi/naoqi_driver/
5656

57-
+-------------+---------------+---------------+-----------------+
58-
| ROS Release | Ubuntu Trusty | Ubuntu Xenial | Debian Stretch |
59-
+=============+===============+===============+=================+
60-
| Lunar | N/A | |lunar| | |lunar_stretch| |
61-
+-------------+---------------+---------------+-----------------+
62-
| Kinetic | N/A | |kinetic| | N/A |
63-
+-------------+---------------+---------------+-----------------+
64-
| Indigo | |indigo| | N/A | N/A |
65-
+-------------+---------------+---------------+-----------------+
57+
+-----------------+---------------------+
58+
| ROS Release | status |
59+
+=================+=====================+
60+
| Melodic-stretch | |melodic-stretch| |
61+
+-----------------+---------------------+
62+
| Melodic | |melodic| |
63+
+-----------------+---------------------+
64+
| Kinetic | |kinetic| |
65+
+-----------------+---------------------+
66+
| Indigo | |indigo| |
67+
+-----------------+---------------------+

package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0"?>
22
<package>
33
<name>naoqi_driver</name>
4-
<version>0.5.10</version>
4+
<version>0.5.11</version>
55
<description>Driver module between Aldebaran's NAOqiOS and ROS. It publishes all sensor and actuator data as well as basic diagnostic for battery, temperature. It subscribes also to RVIZ simple goal and cmd_vel for teleop.</description>
66

77
<author>Karsten Knese</author>
88
<maintainer email="mchamoux@softbankrobotics.com">Marine Chamoux</maintainer>
9+
<maintainer email="mbusy@softbankrobotics.com">Maxime Busy</maintainer>
910
<maintainer email="surya.ambrose@gmail.com">Surya Ambrose</maintainer>
1011
<maintainer email="karsten.knese@gmail.com">Karsten Knese</maintainer>
11-
<maintainer email="natalia.lyubova@gmail.com">Natalia Lyubova</maintainer>
1212
<license>BSD</license>
1313

1414
<build_depend>boost</build_depend>

share/boot_config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@
7171
"laser":
7272
{
7373
"enabled" : true,
74-
"frequency" : 10
74+
"frequency" : 10,
75+
"range_min" : 0.1,
76+
"range_max" : 3.0
7577
},
7678
"sonar":
7779
{

src/converters/joint_state.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ namespace converter
4343
JointStateConverter::JointStateConverter( const std::string& name, const float& frequency, const BufferPtr& tf2_buffer, const qi::SessionPtr& session ):
4444
BaseConverter( name, frequency, session ),
4545
p_motion_( session->service("ALMotion") ),
46+
p_memory_( session->service("ALMemory") ),
4647
tf2_buffer_(tf2_buffer)
4748
{
4849
robot_desc_ = tools::getRobotDescription( robot_ );
@@ -69,7 +70,7 @@ void JointStateConverter::reset()
6970

7071
// set mimic joint list
7172
mimic_.clear();
72-
for(std::map< std::string, boost::shared_ptr< urdf::Joint > >::iterator i = model.joints_.begin(); i != model.joints_.end(); i++){
73+
for(std::map< std::string, urdf::JointSharedPtr >::iterator i = model.joints_.begin(); i != model.joints_.end(); i++){
7374
if(i->second->mimic){
7475
mimic_.insert(make_pair(i->first, i->second->mimic));
7576
}
@@ -89,6 +90,9 @@ void JointStateConverter::callAll( const std::vector<message_actions::MessageAct
8990
{
9091
// get joint state values
9192
std::vector<double> al_joint_angles = p_motion_.call<std::vector<double> >("getAngles", "Body", true );
93+
std::vector<double> al_joint_velocities;
94+
std::vector<double> al_joint_torques;
95+
9296
const ros::Time& stamp = ros::Time::now();
9397

9498
/**
@@ -116,8 +120,26 @@ void JointStateConverter::callAll( const std::vector<message_actions::MessageAct
116120
++itName, ++itPos)
117121
{
118122
joint_state_map[*itName] = *itPos;
123+
124+
try {
125+
al_joint_velocities.push_back(p_memory_.call<double>(
126+
"getData",
127+
"Motion/Velocity/Sensor/" + (*itName)));
128+
129+
al_joint_torques.push_back(p_memory_.call<double>(
130+
"getData",
131+
"Motion/Torque/Sensor/" + (*itName)));
132+
133+
} catch (qi::FutureUserException e) {
134+
// Sets the velocity and torques field to nan if no info is provided
135+
al_joint_velocities.push_back(std::numeric_limits<double>::quiet_NaN());
136+
al_joint_torques.push_back(std::numeric_limits<double>::quiet_NaN());
137+
}
119138
}
120139

140+
msg_joint_states_.velocity = al_joint_velocities;
141+
msg_joint_states_.effort = al_joint_torques;
142+
121143
// for mimic map
122144
for(MimicMap::iterator i = mimic_.begin(); i != mimic_.end(); i++){
123145
if(joint_state_map.find(i->second->joint_name) != joint_state_map.end()){

src/converters/joint_state.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class JointStateConverter : public BaseConverter<JointStateConverter>
4545

4646
typedef boost::shared_ptr<tf2_ros::Buffer> BufferPtr;
4747

48-
typedef std::map<std::string, boost::shared_ptr<urdf::JointMimic> > MimicMap;
48+
typedef std::map<std::string, urdf::JointMimicSharedPtr> MimicMap;
4949

5050
public:
5151
JointStateConverter( const std::string& name, const float& frequency, const BufferPtr& tf2_buffer, const qi::SessionPtr& session );
@@ -71,6 +71,7 @@ class JointStateConverter : public BaseConverter<JointStateConverter>
7171

7272
/** Motion Proxy **/
7373
qi::AnyObject p_motion_;
74+
qi::AnyObject p_memory_;
7475

7576
/** Registered Callbacks **/
7677
std::map<message_actions::MessageAction, Callback_t> callbacks_;

src/converters/laser.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,25 @@ void LaserConverter::reset( )
216216
msg_.angle_min = -2.0944; // -120
217217
msg_.angle_max = 2.0944; // +120
218218
msg_.angle_increment = (2*2.0944) / (15+15+15+8+8); // 240 deg FoV / 61 points (blind zones inc)
219-
msg_.range_min = 0.1; // in m
220-
msg_.range_max = 1.5; // in m
219+
msg_.range_min = this->range_min_; // in m
220+
msg_.range_max = this->range_max_; // in m
221221
msg_.ranges = std::vector<float>(61, -1.0f);
222222
}
223223

224+
void LaserConverter::setLaserRanges(
225+
const float &range_min,
226+
const float &range_max) {
227+
228+
if (range_min > 0)
229+
this->range_min_ = range_min;
230+
else
231+
this->range_min_ = 0.1;
232+
233+
if (range_max > this->range_min_)
234+
this->range_max_ = range_max;
235+
else
236+
this->range_max_ = 3.0;
237+
}
238+
224239
} //converter
225240
} // naoqi

src/converters/laser.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ class LaserConverter : public BaseConverter<LaserConverter>
4848

4949
void reset( );
5050

51+
void setLaserRanges(const float &range_min, const float &range_max);
52+
5153
private:
5254

5355
qi::AnyObject p_memory_;
56+
float range_min_;
57+
float range_max_;
5458

5559
std::map<message_actions::MessageAction, Callback_t> callbacks_;
5660
sensor_msgs::LaserScan msg_;

0 commit comments

Comments
 (0)