mirror of
https://github.com/CopterExpress/clover.git
synced 2026-06-06 17:49:32 +00:00
Compare commits
1 Commits
geographic
...
test-raw-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90be370119 |
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -15,6 +15,14 @@ jobs:
|
|||||||
# run: |
|
# run: |
|
||||||
# docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:melodic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
|
# docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:melodic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
|
||||||
noetic:
|
noetic:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Native Noetic build
|
||||||
|
run: |
|
||||||
|
docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:noetic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
|
||||||
|
|
||||||
|
noetic-raw:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ros:noetic-ros-base
|
container: ros:noetic-ros-base
|
||||||
defaults:
|
defaults:
|
||||||
|
|||||||
@@ -251,5 +251,4 @@ if (CATKIN_ENABLE_TESTING)
|
|||||||
add_rostest(test/test_node_failure.test)
|
add_rostest(test/test_node_failure.test)
|
||||||
add_rostest(test/largemap.test)
|
add_rostest(test/largemap.test)
|
||||||
add_rostest(test/crash_opencv.test)
|
add_rostest(test/crash_opencv.test)
|
||||||
add_rostest(test/duplicate.test)
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -187,8 +187,6 @@ private:
|
|||||||
|
|
||||||
array_.markers.reserve(ids.size());
|
array_.markers.reserve(ids.size());
|
||||||
aruco_pose::Marker marker;
|
aruco_pose::Marker marker;
|
||||||
vector<geometry_msgs::TransformStamped> transforms;
|
|
||||||
transforms.reserve(ids.size());
|
|
||||||
geometry_msgs::TransformStamped transform;
|
geometry_msgs::TransformStamped transform;
|
||||||
transform.header.stamp = msg->header.stamp;
|
transform.header.stamp = msg->header.stamp;
|
||||||
transform.header.frame_id = msg->header.frame_id;
|
transform.header.frame_id = msg->header.frame_id;
|
||||||
@@ -206,33 +204,20 @@ private:
|
|||||||
snapOrientation(marker.pose.orientation, snap_to.transform.rotation, auto_flip_);
|
snapOrientation(marker.pose.orientation, snap_to.transform.rotation, auto_flip_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: check IDs are unique
|
||||||
if (send_tf_) {
|
if (send_tf_) {
|
||||||
transform.child_frame_id = getChildFrameId(ids[i]);
|
transform.child_frame_id = getChildFrameId(ids[i]);
|
||||||
|
|
||||||
// check if such static transform is in the map
|
// check if such static transform is in the map
|
||||||
if (map_markers_ids_.find(ids[i]) == map_markers_ids_.end()) {
|
if (map_markers_ids_.find(ids[i]) == map_markers_ids_.end()) {
|
||||||
// check if a markers with that id is already added
|
transform.transform.rotation = marker.pose.orientation;
|
||||||
bool send = true;
|
fillTranslation(transform.transform.translation, tvecs[i]);
|
||||||
for (auto &t : transforms) {
|
br_->sendTransform(transform);
|
||||||
if (t.child_frame_id == transform.child_frame_id) {
|
|
||||||
send = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (send) {
|
|
||||||
transform.transform.rotation = marker.pose.orientation;
|
|
||||||
fillTranslation(transform.transform.translation, tvecs[i]);
|
|
||||||
transforms.push_back(transform);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
array_.markers.push_back(marker);
|
array_.markers.push_back(marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send_tf_) {
|
|
||||||
br_->sendTransform(transforms);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
markers_pub_.publish(array_);
|
markers_pub_.publish(array_);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB |
@@ -1,8 +0,0 @@
|
|||||||
import pytest
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
def test_no_tf_repeated_data():
|
|
||||||
# `/rosout` acts weirdly inside rostest, so using a subprocess
|
|
||||||
cmd = """python -c 'import rospy, tf; rospy.init_node("foo"); listener = tf.TransformListener(); rospy.sleep(2)'"""
|
|
||||||
output = str(subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT))
|
|
||||||
assert 'TF_REPEATED_DATA' not in output, 'TF_REPEATED_DATA was logged on duplicate markers'
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<launch>
|
|
||||||
<node pkg="image_publisher" type="image_publisher" name="main_camera" args="$(find aruco_pose)/test/duplicate.png">
|
|
||||||
<param name="frame_id" value="main_camera_optical"/>
|
|
||||||
<param name="publish_rate" value="10"/>
|
|
||||||
<param name="camera_info_url" value="file://$(find aruco_pose)/test/camera_info.yaml" />
|
|
||||||
</node>
|
|
||||||
|
|
||||||
<node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" required="true"/>
|
|
||||||
|
|
||||||
<node pkg="nodelet" clear_params="true" type="nodelet" name="aruco_detect" args="load aruco_pose/aruco_detect nodelet_manager" required="true">
|
|
||||||
<remap from="image_raw" to="main_camera/image_raw"/>
|
|
||||||
<remap from="camera_info" to="main_camera/camera_info"/>
|
|
||||||
<param name="length" value="0.33"/>
|
|
||||||
<param name="estimate_poses" value="true"/>
|
|
||||||
<param name="send_tf" value="true"/>
|
|
||||||
<param name="cornerRefinementMethod" value="1"/>
|
|
||||||
</node>
|
|
||||||
|
|
||||||
<param name="test_module" value="$(find aruco_pose)/test/duplicate.py"/>
|
|
||||||
<test test-name="aruco_pose_test" pkg="ros_pytest" type="ros_pytest_runner"/>
|
|
||||||
</launch>
|
|
||||||
@@ -46,14 +46,6 @@ find_package(OpenCV ${_opencv_version} REQUIRED
|
|||||||
imgproc
|
imgproc
|
||||||
)
|
)
|
||||||
|
|
||||||
# Download GeographicLib datasets
|
|
||||||
message(STATUS "Downloading GeographicLib datasets to ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}")
|
|
||||||
add_custom_target(download_geographiclib_datasets ALL
|
|
||||||
COMMAND geographiclib-get-geoids -p ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/GeographicLib egm96-5
|
|
||||||
COMMAND geographiclib-get-gravity -p ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/GeographicLib egm96
|
|
||||||
COMMAND geographiclib-get-magnetic -p ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/GeographicLib emm2015
|
|
||||||
)
|
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
## System dependencies are found with CMake's conventions
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
# find_package(Boost REQUIRED COMPONENTS system)
|
||||||
|
|
||||||
|
|||||||
@@ -44,9 +44,6 @@
|
|||||||
<!-- remap rangefinder -->
|
<!-- remap rangefinder -->
|
||||||
<remap from="mavros/distance_sensor/rangefinder_sub" to="$(arg distance_sensor_remap)" if="$(eval bool(distance_sensor_remap))"/>
|
<remap from="mavros/distance_sensor/rangefinder_sub" to="$(arg distance_sensor_remap)" if="$(eval bool(distance_sensor_remap))"/>
|
||||||
|
|
||||||
<!-- path to find GoegraphicLib datasets -->
|
|
||||||
<env name="GEOGRAPHICLIB_DATA" value="$(eval env('CMAKE_PREFIX_PATH').split(':')[0] + '/share/GeographicLib')"/>
|
|
||||||
|
|
||||||
<rosparam param="plugin_whitelist">
|
<rosparam param="plugin_whitelist">
|
||||||
- altitude
|
- altitude
|
||||||
- command
|
- command
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<node pkg="mavros" type="mavros_node" name="mavros" required="true" output="screen">
|
<node pkg="mavros" type="mavros_node" name="mavros" required="true" output="screen">
|
||||||
<param name="fcu_url" value="udp://@127.0.1:14557"/>
|
<param name="fcu_url" value="udp://@127.0.1:14557"/>
|
||||||
<rosparam command="load" file="$(find clover)/launch/mavros_config.yaml"/>
|
<rosparam command="load" file="$(find clover)/launch/mavros_config.yaml"/>
|
||||||
<env name="GEOGRAPHICLIB_DATA" value="$(eval env('CMAKE_PREFIX_PATH').split(':')[0] + '/share/GeographicLib')"/>
|
|
||||||
</node>
|
</node>
|
||||||
|
|
||||||
<node name="visualization" pkg="mavros_extras" type="visualization" required="true">
|
<node name="visualization" pkg="mavros_extras" type="visualization" required="true">
|
||||||
|
|||||||
Reference in New Issue
Block a user