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

New Error: No Such Thing as Publish? #11

Open
adimehrotra opened this issue Jan 20, 2020 · 14 comments
Open

New Error: No Such Thing as Publish? #11

adimehrotra opened this issue Jan 20, 2020 · 14 comments

Comments

@adimehrotra
Copy link

Tried to tun ./gradlew publish and got this:

./gradlew publish

FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'publish' not found in root project 'CANBridge-Imported'.

  • Try:
    Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 850ms

@adimehrotra
Copy link
Author

Platform Information: I'm on a MAC and have VS Code installed with WPILIB 2020

@willtoth
Copy link
Contributor

Note that this is not a roboRIO project, so importing it using the import tool will likely have adverse effects on the gradle settings.

This is set up as a 'vendor dependency'. The right way to build this is to simply open the folder from VS Code.

This project also explicitly does not build for roboRIO and is designed for non-RIO platforms. I have never used the build environment for Mac so I don't know what would be required there.

@ThadHouse
Copy link
Contributor

As Will said above, this is a vendor library, and is explicitly something that should not be sent through the wpilib importer. We just have no way of detecting the difference from VS Code, so it will still prompt, but it definitely will fail if you actually try to import.

Anything specific you are trying to do with this?

@adimehrotra
Copy link
Author

Ooh okay this I did not know about WPILIB importer.

Im trying to get a computer to control some spark maxes for a project - right now I'm on a MAC later I want to use a Jetson TX1. Want to use CAN because I want to use the features like velocity control and etc!

Any tips on how to use the library after I build it?

@adimehrotra
Copy link
Author

Update: I got this to say "Build Successful" for both the gradle build and gradle publish scripts - but I don't see an output under ~/releases/maven what does this build do what am I supposed to be able to do after I've built it.

I built this on a Jetson TX1 running Ubuntu 18.04

@willtoth
Copy link
Contributor

The outputs will be under the project directory. /build/repos

The output will be a vendor dep that can be installed the same way as other projects.

You can also cross compile this one Windows/Linux, gradleRIO includes some tasks to install the correct toolchain.

I don't have a good example code for using this project yet so to be honest it may be a bit tough to get and running. The best example is probably the test here https://github.com/REVrobotics/CANBridge/blob/master/src/test/cpp/main.cpp

This code should be created from a WPILib VS Code Robot project targeting aarch64

@adimehrotra
Copy link
Author

I really don't have enough experience with this to understand how to install it - I navigated in that directory to CANBridge-cpp and do I need to install this with MAVEN? do I need to get the source files? Like how do I install this so I may use it? Sorry for all the questions

@adimehrotra
Copy link
Author

Also if I were to use this in like a project not being deployed to a roborio with the spark max c++ API, would I import through WPILIB the spark max API, and etc, where would I install the API?

@adimehrotra
Copy link
Author

I guess let's make this super simple: I want to make a ROS node that controls a bunch of SparkMAXs on USB-to-CAN.

@willtoth
Copy link
Contributor

willtoth commented Feb 3, 2020

Understood. So one problem here is that this project only currently has a Windows driver. We need to add a SocketCAN driver as well for it to be compatible on Linux.

@adimehrotra
Copy link
Author

Aw man

@dfiel
Copy link

dfiel commented Feb 4, 2020

I am interested in doing the same as @bumblebeerobotics, creating a ROS node to control some SPARK MAX controllers utilizing a USB to CAN adapter on Linux. Is there a timeline for introducing SocketCAN/Linux support?

@willtoth
Copy link
Contributor

willtoth commented Feb 5, 2020

We don't have a timeline at the moment. The biggest thing is adding a driver type to this project for SocketCAN, everything else should be able to build for Linux/Raspi/aarch64.

The Spark Max will already work as a generic SocketCAN device, it just needs a udev rule (as well as the can/socketcan/gs_usb driver). Right now this udev rule works, but needs some improvement:

ACTION=="add", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a30e", RUN+="/sbin/modprobe gs_usb" RUN+="/bin/sh -c 'echo 0483 a30e ff > /sys/bus/usb/drivers/gs_usb/new_id'"

The closest thing is probably this: https://github.com/ThadHouse/HALSIM_SocketCAN

@ThadHouse

@dfiel
Copy link

dfiel commented Feb 6, 2020

Can you explain that repository you linked? The readme is just some WPI boilerplate. From some rummaging around in the repository, is it just a SocketCAN wrapper for FRC?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants