Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Clang format applied #50

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .docker/ci-shadow-fixed/Dockerfile

This file was deleted.

71 changes: 56 additions & 15 deletions .docker/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,89 @@
# moveit/moveit:melodic-ci
# moveit/moveit2:crystal-ci
# Sets up a base image to use for running Continuous Integration on Travis
FROM ros:crystal-ros-base-bionic

FROM ros:melodic-ros-base
MAINTAINER Dave Coleman dave@picknik.ai
LABEL maintainer="mike@picknik.ai"

ENV TERM xterm

# Setup catkin workspace
ENV CATKIN_WS=/root/ws_moveit
WORKDIR $CATKIN_WS
ENV ROS_WS=/root/ws_moveit
ENV ROS_DISTRO crystal

WORKDIR $ROS_WS

# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
RUN \
mkdir src && \
cd src && \

RUN mkdir src && \
cd $ROS_WS/src && \
#
# Download moveit source, so that we can get necessary dependencies
wstool init --shallow . https://raw.githubusercontent.com/ros-planning/moveit/${ROS_DISTRO}-devel/moveit.rosinstall && \
wstool init --shallow . https://raw.githubusercontent.com/ros-planning/moveit2/moveit2-ci/moveit.rosinstall && \
#
# Update apt package list as previous containers clear the cache
apt-get -qq update && \
apt-get -qq dist-upgrade && \
apt-get -qq dist-upgrade -y && \
#
# Install some base dependencies
apt-get -qq install -y \
# Some source builds require a package.xml be downloaded via wget from an external location
wget \
# Required for rosdep command
sudo \
# Preferred build tools
python-catkin-tools \
clang clang-format-3.9 clang-tidy clang-tools \
ccache && \
ccache \
curl gnupg2 lsb-release \
# Some python dependencies for working with ROS2
python3-colcon-common-extensions \
python3-pip \
python-rosdep \
python3-vcstool \
python3-wstool \
python3-rospkg-modules \
python3-rospkg-modules \
python3-rosdistro-modules \
&& \
#
# Upgrade Pip
python3 -m pip install --upgrade pip && \
#
# install some pip packages needed for testing
python3 -m pip install -U \
argcomplete \
flake8 \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
# git+https://github.com/lark-parser/lark.git@0.7d \
pytest-repeat \
pytest-rerunfailures \
pytest \
pytest-cov \
pytest-runner \
setuptools \
&& \
#
# install Fast-RTPS dependencies
apt-get install -qq --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev \
&& \
#
# Download all dependencies of MoveIt!
rosdep update && \
# Some packages are skipped. See ROS2 source installation
rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false && \
#
# Remove the source code from this container
# TODO: in the future we may want to keep this here for further optimization of later containers
cd .. && \
cd $ROS_WS && \
rm -rf src/ && \
#
# Clear apt-cache to reduce image size
rm -rf /var/lib/apt/lists/*

Expand Down
28 changes: 0 additions & 28 deletions .docker/experimental/Dockerfile

This file was deleted.

5 changes: 3 additions & 2 deletions .docker/release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# moveit/moveit:melodic-release
# moveit/moveit2:crystal-release
# Full debian-based install of MoveIt! using apt-get
# TODO(mlautman): Add this Dockerfile to DockerHub once the moveit2 debians are released

FROM ros:melodic-ros-base
FROM ros:crystal-ros-base-bionic
MAINTAINER Dave Coleman dave@picknik.ai

# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
Expand Down
15 changes: 4 additions & 11 deletions .docker/source/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# moveit/moveit:melodic-source
# moveit/moveit2:crystal-source
# Downloads the moveit source code and install remaining debian dependencies

FROM moveit/moveit:melodic-ci-shadow-fixed
MAINTAINER Dave Coleman dave@picknik.ai
FROM moveit/moveit2:crystal-ci
LABEL maintainer="mike@picknik.ai"

# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
Expand All @@ -11,7 +11,7 @@ RUN \
cd src && \
#
# Download moveit source so that we can get necessary dependencies
wstool init . https://raw.githubusercontent.com/ros-planning/moveit/${ROS_DISTRO}-devel/moveit.rosinstall && \
wstool init . https://raw.githubusercontent.com/ros-planning/moveit2/moveit2-ci/moveit.rosinstall && \
#
# Update apt package list as cache is cleared in previous container
# Usually upgrading involves a few packages only (if container builds became out-of-sync)
Expand All @@ -21,10 +21,3 @@ RUN \
rosdep update && \
rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false && \
rm -rf /var/lib/apt/lists/*

# Configure catkin workspace, but do not build because Docker times out
ENV PYTHONIOENCODING UTF-8
RUN catkin config --extend /opt/ros/$ROS_DISTRO --install --cmake-args -DCMAKE_BUILD_TYPE=Release
# Status rate is limited so that just enough info is shown to keep Docker from timing out,
# but not too much such that the Docker log gets too long (another form of timeout)
# catkin build --limit-status-rate 0.001 --no-notify
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ matrix: # Add a separate config to the matrix, using clang as compiler
- env: TEST=clang-tidy-fix # need to fix clang-tidy issues

before_script:
- git clone -q --depth=1 https://github.com/ros-planning/moveit_ci.git .moveit_ci
- git clone -b movet2-ci -q --depth=1 https://github.com/ros-planning/moveit_ci.git .moveit_ci

script:
- .moveit_ci/travis.sh
66 changes: 44 additions & 22 deletions moveit.rosinstall
Original file line number Diff line number Diff line change
@@ -1,34 +1,56 @@
# This file is intended for users who want to build MoveIt! from source.
# Used with wstool, users can download source of all packages of MoveIt!.

- git:
local-name: moveit
uri: https://github.com/ros-planning/moveit.git
version: master
local-name: moveit2
uri: https://github.com/ros-planning/moveit2.git
version: moveit2-ci

- git:
local-name: moveit_msgs
uri: https://github.com/ros-planning/moveit_msgs.git
version: melodic-devel
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/AcutronicRobotics/moveit_msgs
version: ros2
- git:
local-name: moveit_resources
uri: https://github.com/ros-planning/moveit_resources.git
version: master
local-name: geometric_shapes
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/AcutronicRobotics/geometric_shapes
version: ros2
- git:
local-name: moveit_visual_tools
uri: https://github.com/ros-planning/moveit_visual_tools.git
version: melodic-devel
local-name: object_recognition_msgs
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/AcutronicRobotics/object_recognition_msgs
version: master
- git:
local-name: rviz_visual_tools
uri: https://github.com/PickNikRobotics/rviz_visual_tools
version: melodic-devel
local-name: octomap_msgs
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/AcutronicRobotics/octomap_msgs
version: ros2
- git:
local-name: geometric_shapes
uri: https://github.com/ros-planning/geometric_shapes.git
version: melodic-devel
local-name: random_numbers
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/AcutronicRobotics/random_numbers
version: ros2
- git:
local-name: srdfdom
uri: https://github.com/ros-planning/srdfdom.git
version: melodic-devel
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/mlautman/srdfdom
version: ros2
- git:
local-name: urdf_parser_py
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/AcutronicRobotics/urdf_parser_py
version: ros2
- git:
local-name: octomap
uri: https://github.com/AcutronicRobotics/octomap
version: ros2
- git:
local-name: moveit_resources
# TODO(mlautman): update to ros-planning once the package has been ported
uri: https://github.com/AcutronicRobotics/moveit_resources
version: master
- git:
local-name: moveit_tutorials
uri: https://github.com/ros-planning/moveit_tutorials.git
version: melodic-devel
local-name: joint_state_publisher
uri: https://github.com/ros/joint_state_publisher
version: ros2-devel
Empty file added moveit/COLCON_IGNORE
Empty file.
Empty file added moveit_commander/COLCON_IGNORE
Empty file.
Empty file added moveit_core/COLCON_IGNORE
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ void visualizeDistribution(const ConstraintSamplerPtr& sampler, const robot_stat
const std::string& link_name, unsigned int sample_count,
visualization_msgs::MarkerArray& markers);

void visualizeDistribution(const moveit_msgs::msg::Constraints& constr, const planning_scene::PlanningSceneConstPtr& scene,
const std::string& group, const std::string& link_name, unsigned int sample_count,
void visualizeDistribution(const moveit_msgs::msg::Constraints& constr,
const planning_scene::PlanningSceneConstPtr& scene, const std::string& group,
const std::string& link_name, unsigned int sample_count,
visualization_msgs::MarkerArray& markers);

double countSamplesPerSecond(const ConstraintSamplerPtr& sampler, const robot_state::RobotState& reference_state);

double countSamplesPerSecond(const moveit_msgs::msg::Constraints& constr, const planning_scene::PlanningSceneConstPtr& scene,
const std::string& group);
double countSamplesPerSecond(const moveit_msgs::msg::Constraints& constr,
const planning_scene::PlanningSceneConstPtr& scene, const std::string& group);
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -321,15 +321,17 @@ bool PR2ArmKinematicsPlugin::initialize(const moveit::core::RobotModel& robot_mo
}

bool PR2ArmKinematicsPlugin::getPositionIK(const geometry_msgs::Pose& ik_pose, const std::vector<double>& ik_seed_state,
std::vector<double>& solution, moveit_msgs::msg::MoveItErrorCodes& error_code,
std::vector<double>& solution,
moveit_msgs::msg::MoveItErrorCodes& error_code,
const kinematics::KinematicsQueryOptions& options) const
{
return false;
}

bool PR2ArmKinematicsPlugin::searchPositionIK(const geometry_msgs::Pose& ik_pose,
const std::vector<double>& ik_seed_state, double timeout,
std::vector<double>& solution, moveit_msgs::msg::MoveItErrorCodes& error_code,
std::vector<double>& solution,
moveit_msgs::msg::MoveItErrorCodes& error_code,
const kinematics::KinematicsQueryOptions& options) const
{
if (!active_)
Expand Down Expand Up @@ -378,7 +380,8 @@ bool PR2ArmKinematicsPlugin::searchPositionIK(const geometry_msgs::Pose& ik_pose
bool PR2ArmKinematicsPlugin::searchPositionIK(const geometry_msgs::Pose& ik_pose,
const std::vector<double>& ik_seed_state, double timeout,
const std::vector<double>& consistency_limit,
std::vector<double>& solution, moveit_msgs::msg::MoveItErrorCodes& error_code,
std::vector<double>& solution,
moveit_msgs::msg::MoveItErrorCodes& error_code,
const kinematics::KinematicsQueryOptions& options) const
{
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ class PR2ArmKinematicsPlugin : public kinematics::KinematicsBase
*/
bool searchPositionIK(
const geometry_msgs::Pose& ik_pose, const std::vector<double>& ik_seed_state, double timeout,
std::vector<double>& solution, const IKCallbackFn& solution_callback, moveit_msgs::msg::MoveItErrorCodes& error_code,
std::vector<double>& solution, const IKCallbackFn& solution_callback,
moveit_msgs::msg::MoveItErrorCodes& error_code,
const kinematics::KinematicsQueryOptions& options = kinematics::KinematicsQueryOptions()) const override;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,10 @@ class MoveItControllerHandle
* The controller is expected to execute the trajectory, but this function call should not block.
* Blocking is achievable by calling waitForExecution().
* Return false when the controller cannot accept the trajectory. */
*
* The controller is expected to execute the trajectory, but this function call should not block.
* Blocking is achievable by calling waitForExecution().
* Return false when the controller cannot accept the trajectory. */
virtual bool sendTrajectory(const moveit_msgs::msg::RobotTrajectory& trajectory) = 0;
**The controller is expected to execute the trajectory,
but this function call should not block.* Blocking is achievable by calling waitForExecution().*
Return false when the controller cannot accept the trajectory.* /
virtual bool sendTrajectory(const moveit_msgs::msg::RobotTrajectory &trajectory) = 0;

/** \brief Cancel the execution of any motion using this controller.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1060,11 +1060,13 @@ class KinematicConstraintSet

std::vector<moveit_msgs::msg::JointConstraint> joint_constraints_; /**< \brief Messages corresponding to all internal
joint constraints */
std::vector<moveit_msgs::msg::PositionConstraint> position_constraints_; /**< \brief Messages corresponding to all
internal position constraints */
std::vector<moveit_msgs::msg::OrientationConstraint> orientation_constraints_; /**< \brief Messages corresponding to all
std::vector<moveit_msgs::msg::PositionConstraint> position_constraints_; /**< \brief Messages corresponding to all
internal position constraints */
std::vector<moveit_msgs::msg::OrientationConstraint> orientation_constraints_; /**< \brief Messages corresponding to
all
internal orientation constraints */
std::vector<moveit_msgs::msg::VisibilityConstraint> visibility_constraints_; /**< \brief Messages corresponding to all
std::vector<moveit_msgs::msg::VisibilityConstraint> visibility_constraints_; /**< \brief Messages corresponding to
all
internal visibility constraints */
moveit_msgs::msg::Constraints all_constraints_; /**< \brief Messages corresponding to all internal constraints */
};
Expand Down
Loading