Comments (9)
I'll try to compile the tests when I have time (probably this weekend).
from ev3dev-lang-cpp.
I have no experience with ROS (actually have no idea what that is), but if you tell me what exactly you are trying to do with this library, I could try to help you.
To use the library you can just copy ev3dev.cpp
and ev3dev.h
files into your project and compile it however you do compilation (see the README for some more info). Something like CXX -std=c++11 -O3 -o myproject ev3dev.cpp myproject.cpp
, where CXX
is your compiler command.
If you want to use the library in stretch, you'll need to make a couple of changes, similar to ev3dev/ev3dev-lang-python@06ae05f. Namely, you'll need to change these parts of the code:
Lines 954 to 957 in 539f241
Line 1022 in 539f241
from ev3dev-lang-cpp.
Hi,
Sorry this post might not be helpful. I’m currently away for work with limited internet access... but I just wanted to link this to another issue:
moriarty/ev3dev_ros_demo#1 (comment)
from ev3dev-lang-cpp.
@ddemidov: for some reason I still can't connect to any of the sensors, motors, leds, battery, but the sound part of the test menu works fine and also the lcd part, but it looks like they are not dependent on connecting. What can be the problem?
from ev3dev-lang-cpp.
Are you using stretch?
from ev3dev-lang-cpp.
Yes and I have placed the ev3dev.cpp and ev3dev.h file in the src folder of my project and added it in my CMakelists file:
add_library(ev3dev src/ev3dev.cpp)
My CMakelists file is in the project folder and the ev3dev files in the src folder.
I have also specified the library as a target link library:
target_link_libraries(ev3dev_test_node ${catkin_LIBRARIES} ev3dev ) target_link_libraries(ev3dev ${catkin_LIBRARIES} )
I have tried to put some cout
calls in the ev3dev.cpp file, but they didn't get printed in the terminal.
from ev3dev-lang-cpp.
I have also checked that the SYS_ROOT matches the root of the classes on the EV3. Also I can see the sensors and motors and their values via the LCD screen.
Sorry i'm new to C++, so my questions might be flawed them self.
from ev3dev-lang-cpp.
Meanwhile, could you please check if #30 helps you? It affects leds, buttons, and port names. Note that if you use strings to specify addresses, as in
ev3dev::large_motor m("outA");
then you should change that to
ev3dev::large_motor m("ev3-ports:outA");
or, better yet, use the provided constants:
ev3dev::large_motor m(ev3dev::OUTPUT_A);
from ev3dev-lang-cpp.
thank you so much @ddemidov made the test node run the motor and it registered the sensors, thank you, thank you, thank you.
It was a matter of changing the port names.
Still an issue with the leds, but I don't need to work in my project.
from ev3dev-lang-cpp.
Related Issues (20)
- Cannot compile library on brick HOT 3
- Cross Compiling on Windows command not working HOT 7
- ev3dev-lang-cpp ready for ev3dev-stretch ? HOT 5
- Access file as quickly as possible HOT 19
- Problem to run a simple motor program HOT 2
- CMakeLists.txt forces C++11, breaking C++14 projects wanting to include it HOT 2
- Problem with pthread_xxx code (version GLIBCXX_3.4.21 not found) HOT 4
- What i should do with these files? HOT 1
- Mindstorms freezes while doing apt-get update HOT 2
- Connecting two large EV3 motors HOT 14
- Would you be interested in working UTs which could be run on host system? HOT 1
- What happened to Carlson Minot? HOT 4
- can't install gcc-5/unstable
- Python bindings seem to be faster than CPP for `infrared_sensor.proximity()` or `touch_sensor.is_pressed()` HOT 4
- Multiple definitions of symbols when linking HOT 1
- small question about polarity and speed_sp values on a motor HOT 1
- Support for bluetooth connections?
- Step 7, installing the librarys, doesnt work anymore. HOT 3
- Step 7 gcc compiler doesnt exist HOT 12
- Installation unter Windows 11 schlägt fehlt, Package kann nicht gefunden werden
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ev3dev-lang-cpp.