GithubHelp home page GithubHelp logo

angles's Introduction

Robot Operating System (ROS)
===============================================================================

ROS is a meta-operating system for your robot.  It provides
language-independent and network-transparent communication for a
distributed robot control system.

Installation Notes
------------------

For full installation instructions, including system prerequisites and
platform-specific help, see:

  http://wiki.ros.org/ROS/Installation

angles's People

Contributors

ace314159 avatar bfjelds avatar bulwahn avatar cottsay avatar crdelsey avatar dbking77 avatar dlu avatar francofusco avatar garaemon avatar gbiggs avatar jonbinney avatar mikaelarguedas avatar sloretz avatar tfoote avatar vrabaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angles's Issues

failed to link angles

Starting >>> nav2_costmap_2d
--- stderr: nav2_costmap_2d                               
/usr/bin/ld: cannot find -linstall/angles
collect2: error: ld returned 1 exit status

It seems to relate to #28

Cannot import angles on Ubuntu Xenial

Having issue using the python angles in a node of mine. After digging around I can't find the python source in the deb.

$ dpkg-deb -c ros-kinetic-angles_1.9.10-0xenial-20160318-145244-0700_amd64.deb 
drwxr-xr-x root/root         0 2016-03-18 16:53 ./
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/include/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/include/angles/
-rw-r--r-- root/root      9868 2016-03-18 16:00 ./opt/ros/kinetic/include/angles/angles.h
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/lib/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/lib/pkgconfig/
-rw-r--r-- root/root       165 2016-03-18 16:53 ./opt/ros/kinetic/lib/pkgconfig/angles.pc
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/share/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/share/angles/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./opt/ros/kinetic/share/angles/cmake/
-rw-r--r-- root/root      7274 2016-03-18 16:53 ./opt/ros/kinetic/share/angles/cmake/anglesConfig.cmake
-rw-r--r-- root/root       427 2016-03-18 16:53 ./opt/ros/kinetic/share/angles/cmake/anglesConfig-version.cmake
-rw-r--r-- root/root       983 2016-03-18 16:00 ./opt/ros/kinetic/share/angles/package.xml
drwxr-xr-x root/root         0 2016-03-18 16:53 ./usr/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./usr/share/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./usr/share/doc/
drwxr-xr-x root/root         0 2016-03-18 16:53 ./usr/share/doc/ros-kinetic-angles/
-rw-r--r-- root/root       778 2016-03-18 16:52 ./usr/share/doc/ros-kinetic-angles/changelog.Debian.gz

After downloading it from GH and running a local pip install I was able to import. Any reason why the ros-kinetic-angles doesn't include the python bindings?

Issue when angles is built from source (ROS2 Humble)

ROS2 Distro: Humble
OS: Ubuntu 20.04
This is about branch: humble-devel

I built angles from source, and then tried to build nebula, a package that depends on angles, but got the following error:

fatal error: angles/angles/angles.h: No such file or directory

I confirmed that nebula builds when angles is installed through a binary for ROS2 Humble on Ubuntu 22.04 (installed through rosdep), so the issue is specifically about building angles from source.

The following fix in angles' CMakeLists.txt solved my problem:

target_include_directories(angles INTERFACE
  "$<INSTALL_INTERFACE:include/angles>")

->

target_include_directories(angles INTERFACE
  "$<INSTALL_INTERFACE:include>")

Is it possible to make this change permanent on the humble-devel branch?

On a related note, I wonder why we have:

ament_export_include_directories("include/angles")

Instead of:

ament_export_include_directories("include")

Floating point precision in comparison of shortest_angular_distance_with_large_limits

I am currently debugging issues for a robot with very large joint limits (>2pi for both left and right limits). In particular, when the current implementation of shortest_angular_distance_with_large_limits returns false.

I traced some of these cases down to:
(a) user input: when from is outside of left_limit --> This is already highlighted in the doxygen as a requirement for the function to work as expected.
(b) machine precision when comparing the clockwise/counter-clockwise options with <=.

I'd like to get your insights into how to best address:

For (a), would it be an option to clamp from to left/right limits as a first step inside the function if outside, or should this be on the user to enforce? This would resolve the current stated limitation for the function to work as expected as highlighted in the function documentation, but would change current existing behaviour. Some users, e.g. the ROS-Control boilerplate controllers, do not currently take this restriction into account and may be unaware of the incorrect function if from is outside the limits. (I will prepare a fix for the JointGroupPositionController).

For (b), this case happens e.g. when we are exactly on the boundary of the limits (clamped outside as a solution to (a)), and with the additional floating point operations i.e. adding the delta/delta_2pi, the conditions are now no longer met with <= (cf.

// start by trying with the shortest angle (delta).
double to2 = from + delta;
if(left_limit <= to2 && to2 <= right_limit) {
// we can move in this direction: return success if the "from" angle is inside limits
shortest_angle = delta;
return left_limit <= from && from <= right_limit;
}
// delta is not ok, try to move in the other direction (using its complement)
to2 = from + delta_2pi;
if(left_limit <= to2 && to2 <= right_limit) {
// we can move in this direction: return success if the "from" angle is inside limits
shortest_angle = delta_2pi;
return left_limit <= from && from <= right_limit;
}
). One work-around I am currently using is to subtract/add an eps to the limits when clamping before passing the from/to as arguments.. We could use the machine precision epsilon and figure out the number of operations/expected deviation or select a small-enough-to-be-not-noticeable-in-practice value (1e-6, 1e-9). Would that be workable?

Alternatively, and perhaps the "wontfix" solution could be to advise to clamp the from and to arguments to something smaller by eps than the limits. This would of course resolve (b) entirely in user-code.

Here are a few example cases:

from __future__ import print_function
import angles

examples = [
    #[5.95171, 0.331613, 0.331613, 5.95157, 0.66309],  # issue: from value is outside right_limit --> (a), expected behaviour
    #[6.80644, 2, 0.523599, 5.75959, -4.80644],             # issue: from value is outside right_limit --> (a), expected behaviour
    #[9.09866, 0.523599, 0.523599, 5.75959, -2.29187], # issue: from value is outside right_limit --> (a), expected behaviour
    [5.75959, 0.523599, 0.523599, 5.75959, -2.29187], # issue: from is _at_ right_limit, to is _at_ left_limit --> (b), machine precision issue
]
for example in examples:
    print(example[:-1], "=", angles.shortest_angular_distance_with_large_limits(example[0], example[1], example[2], example[3]))

Errors in windows ci build

Link to windows ci log
We're using ROS2.

11:48:04 C:\ci\ws\install\include\angles/angles.h(70,43): error C2065: 'M_PI': undeclared identifier (compiling source file C:\ci\ws\src\ros-controls\ros2_controllers\joint_trajectory_controller\src\joint_trajectory_controller.cpp) [C:\ci\ws\build\joint_trajectory_controller\joint_trajectory_controller.vcxproj]

11:48:04 C:\ci\ws\install\include\angles/angles.h(70,47): error C2661: 'fmod': no overloaded function takes 1 arguments (compiling source file C:\ci\ws\src\ros-controls\ros2_controllers\joint_trajectory_controller\src\joint_trajectory_controller.cpp) [C:\ci\ws\build\joint_trajectory_controller\joint_trajectory_controller.vcxproj]

There seem to be several topics about this on stackoverflow

how should we go about fixing this?

Cannot import angles on Ubuntu Trusty

This is the same as issue #10 except it affects Ubuntu 14.04 (Trusty). I checked to be certain that I've got the latest packages installed.

$ dpkg -l ros-indigo-angles 
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture      Description
+++-=========================-=================-=================-========================================================
ii  ros-indigo-angles         1.9.10-0trusty-20 amd64             This package provides a set of simple math utilities to 

Thanks for your help.

ROS2 Foxy Python angles? API Docs is 404

installing ros2-foxy-angles does not expose a Python angles module (perhaps because setup.py refers to catkin?)

ros2 foxy API Doc is 404. When Python is supported suggest the API Doc include:

  • place <exec_depends>angles</exec_depends> in package.xml
  • run rosdep install -i --from-path src in your ros2 workspace root
  • code example:
    import angles
    field_of_view_radians = angles.from_degrees(25.0)

Support for arch?

No definition of [angles] for OS [arch], (on galactic)

Is this on the roadmap?

Issue with the installation path of the headers

There is an issue with the CMakeLists.txt on branch ros2 since PR #28. Line 23 should be

install(DIRECTORY include/ DESTINATION include)

instead of

install(DIRECTORY include/ DESTINATION include/angles)

because the latter results in the angles.h header being under include/angles/angles/angles.h instead of include/angles/angles.h, which breaks the build of a few packages on galactic (joint_trajectory_controller for instance).

Possibly also related to #30 .

shortest_angular_distance_with_limits bug

I believe I've found a bug in angles... if I call:

from = 1.04700021
to = 1.04700027
left_limit = 1.047
right_limit = -2.147

result = shortest_angular_distance_with_limits(from, to, left_limit, right_limit, shortest_angle)

I get

shortest_angle = -6.28318525
result = 0

Where the shortest_angle should be a small decimal number. So I guess its calculating the angle all the way around the unit circle, instead of the small sliver of distance between the two positions (my application is the effort-based position controller in ros_control).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.