Coder Social home page Coder Social logo

rosjava_bootstrap's Introduction

RosJava

Metapackage for the official rosjava repositories.

See the rosjava_core readme for more details.

rosjava_bootstrap's People

Contributors

adamantivm avatar damonkohler avatar drigz avatar ernestmc avatar exo-core avatar stonier avatar talregev avatar theosakamg avatar

Stargazers

 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

rosjava_bootstrap's Issues

Make buildscript pointer release agnostic

all So that we don't need to change the build scripts of all projects with each release.

Citing the wise @stonier:

This is probably something that could almost be made constant and ease the release process. Damon was looking into it at some point. However probably not high priority with this (last) release. Couldn't do immediately as it points to shifting changes in the rosjava bootstrap libraries.

Revise maven repository dependencies

Revise our maven url sources in the ros plugin @talregev is using the list below. I do not believe we need to add the rep.maven.xxx or central.maven.xxx - these should be automatically picked up by mavenCentral(). The jfrog is the standout one there - what is in that?

rootProject.allprojects {
    repositories {
        maven {
            url "https://github.com/talregev/rosjava_mvn_repo/raw/master/"
        }
        maven {
            url "https://github.com/rosjava/rosjava_mvn_repo/raw/master/"
        }
        maven {
            url "http://central.maven.org/maven2/"
        }
        maven {
            url "https://repo.jfrog.org/artifactory/libs-releases/"
        }
        maven {
            url "https://repo.maven.apache.org/maven2/"
        }
        maven {
            url "https://repo1.maven.org/maven2/"
        }
    }
}

How are unsigned integers being stored in rosjava messages?

@damonkohler @stonier

It looks like uint32 and uint64 are being stored in the same integers as their signed counterparts: int and long. Can anyone confirm that's the case?

https://github.com/rosjava/rosjava_bootstrap/blob/hydro/message_generation/src/main/java/org/ros/internal/message/RawMessage.java#L112

Java doesn't have unsigned integers, so at the very least uint16 should be stored in an 'int' and uint32 should be stored in a 'long', and uint64 should be...???

update gradle version from the internet.

i ask already in stackoverflow.

i ask again too.
We want be able to update gradle version from the internet. when we change one or two file, all the projects will compile on the new gradle. it save us a lot of work.

start it here
we can update gradle version variable from the internet.

i think one "ugly" way, it to upload gradle zip in our repositories, and the project will always take that file (gradle.zip) without version in the name, and when will be new gradle, we will update and all the project will take the new file. need to check if my idea is working.

Outdated buildToolsVersion in ros-android gradle plugin

When applying the ros-android gradle plugin, I get the following warning from Android Studio:

WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. Remove Build Tools version and sync project

project level build.gradle

buildscript {
    apply from: "https://github.com/rosjava/android_core/raw/kinetic/buildscript.gradle"
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

subprojects {

    apply plugin: 'ros-android'

    afterEvaluate { project ->
        android {
            // Exclude a few files that are duplicated across our dependencies and
            // prevent packaging Android applications.
            packagingOptions {
                exclude "META-INF/LICENSE.txt"
                exclude "META-INF/NOTICE.txt"
            }
            lintOptions {
                abortOnError false
            }
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

No default maven repository set in the plugin

Looks like we have a bug in the ros plugin.

When there aren't any environment variables (windows), the system getenv calls return null, wiping out the defaults that were set in the extension constructor.

Should also think about what is a good default for the ROS_MAVEN_DEPLOYMENT_REPOSITORY on windows.

Time class does not follow getter/setter of other messages

@damonkohler @stonier

It looks like here at the Time (and Duration) classes that the method to access secs and nsecs does not follow the same pattern as for the rest of the messages:
https://github.com/rosjava/rosjava_bootstrap/blob/hydro/message_generation/src/main/java/org/ros/message/Time.java#L43

It looks like the old way, not the new "getSecs(), getNSecs(), setSecs(0)" method. So when you access it, the code looks like this:

message.getHeader().getStamp().secs

Do we want to add the methods into the Time and Duration classes?

Updates to rosjava message generation

Comparison of changes/updates needed between PR's #13 and #18. Both hit the transitive dependency issue and what's in #18 is great, it's cleaner.

  • update the catkin_create wizard template with the updated msg generation api.
  • update rosjava_messages' build.gradle.template with the updated msg generation api.
  • implement the --package-path option for the java msg generator from #13.
  • fix the bad version number checking pointed to by the TODO message in 3ee1817, it will break going from 9 -> 10.

Message generation bombs for multiple package versions

Problem: If there's a deb installed version of a package and a source installed version, it will sometimes pull the older version.

Reason: message generation's StringFileProvider stores information in a google concurrentmap (hashmap) which provides no guarantees about ordering. When generating sources, it will then ignore the second message file found in that map...A comment from MessageDefinitionFileProvider:

// First definition wins.

Use maven-publish in the android plugin

We currently have to fallback to old maven publishing using uploadArchives with android (see here, especially the comments section for reasons why it won't currently work).

This means we can't match what we are doing with rosjava, nor even think about debs for it yet. Debs are a no-show anyway because there is no easy way of installing the android sdk yet so that is not a great loss.

Still it would be good to get rosjava and rosandroid behaving the same way when publishing.

generate java code for actions in same source workspace

I'm very happy to see the PRs provided by @exo-core wrt. code generation for action files...
we've recently been hacking around this, too, without finding a satisfying solution

the current kinetic branch works with actions which are already released (although, I think this is because the msg files generated for each action can be found in the msg folder within the respective pkg under /opt/ros - thus the java classes get generated by the same MessageGeneration doing the topic msg files)

still, I'm having trouble generating code for actions which are defined in packages which are located in the same source workspace as rosjava_bootstrap, genjava & co

we also need this to work for our CI (travis)...using ros-industrial/industrial_ci where everything is compiled in a single workspace (in which src is read-only)
I'm still playing around with it a bit more and try to provide a rosinstall file to reproduce my usecase.

@exo-core @jubeira
what is your experience? have you used it this way?

install tags are wrong

I get the following error from our TravisCI job.
It's compiling (rosjava) workspaces via catkin build with "install" option activated (i.e. catkin config --install)

Errors     << rosjava_bootstrap:install /root/catkin_ws/logs/rosjava_bootstrap/build.install.000.log
CMake Error at cmake_install.cmake:133 (file):
  file INSTALL cannot find
  "/root/catkin_ws/devel/.private/rosjava_bootstrap/share/maven/org/ros/rosjava_bootstrap".

the respective install tag is

install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_MAVEN_DESTINATION}/org/ros/rosjava_bootstrap/ 
DESTINATION ${CATKIN_GLOBAL_MAVEN_DESTINATION}/org/ros/rosjava_bootstrap)

there seems to be a discrepancy for CATKIN_DEVEL_PREFIX between catkin_make and catkin-tools: https://answers.ros.org/question/248718/catkin_devel_prefix-in-catkin_make-vs-catkin-tools/

also, I can't seem to find the code where CATKIN_GLOBAL_MAVEN_DESTINATION is set.
it seems to be set to share/maven given the error notification above...

anyway:
what would be wrong about setting the install tag to

install(DIRECTORY ${ROS_MAVEN_DEPLOYMENT_REPOSITORY}/org/ros/rosjava_bootstrap/ 
DESTINATION ${CATKIN_GLOBAL_MAVEN_DESTINATION}/org/ros/rosjava_bootstrap)

or even drop the intall tag as "installing" should be done via the gradle wrappers install task, right?

this problem applies for several repos:

Build is failing on debian Jessie due to SSL issues

http://build.ros.org/view/Kbin_dj_dJ64/job/Kbin_dj_dJ64__rosjava_bootstrap__debian_jessie_amd64__binary/30/console

00:03:21.394 cd /tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2 && ROS_MAVEN_REPOSITORY=https://github.com/rosjava/rosjava_mvn_repo/raw/master GRADLE_USER_HOME=/tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2/obj-x86_64-linux-gnu/devel/share/gradle /tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2/obj-x86_64-linux-gnu/catkin_generated/env_cached.sh /tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2/gradlew -q publish installApp
00:03:21.641 Downloading https://services.gradle.org/distributions/gradle-2.14.1-all.zip
00:03:22.185 
00:03:22.185 Exception in thread "main" java.lang.RuntimeException: javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
00:03:22.186 	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
00:03:22.186 	at org.gradle.wrapper.Install.createDist(Install.java:44)
00:03:22.186 	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
00:03:22.186 	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:55)
00:03:22.186 Caused by: javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
00:03:22.186 	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
00:03:22.186 	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1914)
00:03:22.186 	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1872)
00:03:22.186 	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1855)
00:03:22.186 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1376)
00:03:22.187 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1353)
00:03:22.187 	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
00:03:22.187 	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
00:03:22.187 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1348)
00:03:22.187 	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
00:03:22.187 	at org.gradle.wrapper.Download.downloadInternal(Download.java:56)
00:03:22.187 	at org.gradle.wrapper.Download.download(Download.java:42)
00:03:22.187 	at org.gradle.wrapper.Install$1.call(Install.java:57)
00:03:22.187 	at org.gradle.wrapper.Install$1.call(Install.java:44)
00:03:22.187 	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
00:03:22.187 	... 3 more
00:03:22.187 Caused by: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
00:03:22.187 	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1024)
00:03:22.187 	at sun.security.pkcs11.P11Key.equals(P11Key.java:158)
00:03:22.187 	at java.util.ArrayList.indexOf(ArrayList.java:298)
00:03:22.187 	at java.util.ArrayList.contains(ArrayList.java:281)
00:03:22.187 	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:239)
00:03:22.188 	at sun.security.validator.Validator.validate(Validator.java:260)
00:03:22.188 	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
00:03:22.188 	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
00:03:22.188 	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
00:03:22.188 	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1459)
00:03:22.188 	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
00:03:22.188 	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:961)
00:03:22.188 	at sun.security.ssl.Handshaker.process_record(Handshaker.java:897)
00:03:22.188 	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1033)
00:03:22.188 	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342)
00:03:22.188 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1369)
00:03:22.188 	... 13 more
00:03:22.188 Caused by: java.security.InvalidKeyException: EC parameters error
00:03:22.188 	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:284)
00:03:22.188 	at sun.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:59)
00:03:22.188 	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1021)
00:03:22.188 	... 28 more
00:03:22.189 Caused by: java.security.NoSuchProviderException: no such provider: SunEC
00:03:22.189 	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
00:03:22.189 	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
00:03:22.189 	at java.security.Security.getImpl(Security.java:697)
00:03:22.189 	at java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:199)
00:03:22.189 	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:279)
00:03:22.189 	... 30 more
00:03:22.213 CMakeFiles/gradle-rosjava_bootstrap.dir/build.make:52: recipe for target 'CMakeFiles/gradle-rosjava_bootstrap' failed
00:03:22.213 make[4]: Leaving directory '/tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2/obj-x86_64-linux-gnu'
00:03:22.213 make[4]: *** [CMakeFiles/gradle-rosjava_bootstrap] Error 1
00:03:22.213 CMakeFiles/Makefile2:249: recipe for target 'CMakeFiles/gradle-rosjava_bootstrap.dir/all' failed
00:03:22.213 make[3]: *** [CMakeFiles/gradle-rosjava_bootstrap.dir/all] Error 2
00:03:22.213 make[3]: Leaving directory '/tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2/obj-x86_64-linux-gnu'
00:03:22.214 Makefile:120: recipe for target 'all' failed
00:03:22.214 make[2]: *** [all] Error 2
00:03:22.214 make[2]: Leaving directory '/tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2/obj-x86_64-linux-gnu'
00:03:22.214 dh_auto_build: make -j1 returned exit code 2
00:03:22.216 debian/rules:36: recipe for target 'override_dh_auto_build' failed
00:03:22.216 make[1]: *** [override_dh_auto_build] Error 2
00:03:22.216 make[1]: Leaving directory '/tmp/binarydeb/ros-kinetic-rosjava-bootstrap-0.3.2'
00:03:22.219 debian/rules:23: recipe for target 'build' failed
00:03:22.219 make: *** [build] Error 2
00:03:22.219 dpkg-buildpackage: error: debian/rules build gave error exit status 2
00:03:22.223 E: Building failed
00:03:22.226 Traceback (most recent call last):
00:03:22.227   File "/tmp/ros_buildfarm/ros_buildfarm/binarydeb_job.py", line 133, in build_binarydeb
00:03:22.227     subprocess.check_call(cmd, cwd=source_dir)
00:03:22.227   File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
00:03:22.227     raise CalledProcessError(retcode, cmd)
00:03:22.228 subprocess.CalledProcessError: Command '['apt-src', 'build', 'ros-kinetic-rosjava-bootstrap']' returned non-zero exit status 1
00:03:22.228 
00:03:22.228 --------------------------------------------------------------------------------------------------
00:03:22.228 `apt-src build ros-kinetic-rosjava-bootstrap` failed.
00:03:22.228 This is usually because of an error building the package.
00:03:22.228 The traceback from this failure (just above) is printed for completeness, but you can ignore it.
00:03:22.228 You should look above `E: Building failed` in the build log for the actual cause of the failure.
00:03:22.228 --------------------------------------------------------------------------------------------------
00:03:22.228 

I think this might be a systematic issue with Jessie being older.
@nuclearsandwich @mikaelarguedas FYI

Could not find method google() for arguments [] on repository container

I tried to build a rosjava package using the "catkin_create_rosjava_pkg" command.

FAILURE: Build failed with an exception.

Could not find method google() for arguments [] on repository container.

My setup :
ROS - kinetic
android-studio - 3.2.1
gradle - 4.6
Android/Sdk/build-tools - 25.02, 26.02, 28.03

hydro message dependencies muddled with indigo

Hydro uses this function from the catkin plugin:

generateMessageArtifact()
....
        messageDependencies.each { d ->
             if ( p.getParent().getChildProjects().containsKey(d) ) {
                 /* println("  Internal: " + d) */
                 p.dependencies.add("compile", p.dependencies.project(path: ':' + d))
             } else {
                 /* println("  External: " + d) */
                 p.dependencies.add("compile", 'org.ros.rosjava_messages:' + d + ':[0.0,)')
             }
         }

Obviously, the open ended dependency is now bad as it will drag indigo released messages into the build.

Indigo doesn't have this problem as it generates exact version dependencies from one message package to another.

custom messages with fixed-length arrays are received in rosjava as an empty array

As already written in rosjava_core rosjava/rosjava_core#221, but I guess here ist the right place.

I discovered an issue with messages containing an array with a fixed (predefined size).

Message example that is not working:

string[5] names

Message example that is working:

string[] names

If I subscribe in rosjava (Android) to the first message, I always get an empty names array with size zero. However, if I publish the second message with dynamic size 5 (filled with names.push_back("name");) I get the correct size with the content.

Is this a known limitation? Or just a bug?

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.