-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for Lego Mindstorms EV3? #6
Comments
What is the usage of the Depth Camera? Juan Antonio |
The depth camera is not currently required for anything. It didn't have the range I required. |
Initial orientation of the ribot is unimportant or are you asking about the lidar |
Good morning @rlsutton1, Yes, I am interesting to reuse SLAM features with a robot developed with EV3. I would like to see if the classes that model the robot with the Roomba connection has some kind of Factory or something similar in order to provide another implementation in this case an EV3. |
Sorry, no factory. There are 2 classes for the roomba, RoombaRobot and Roomba630. A factory is an excellent idea. You could copy RoombaRobot with minimal changes. You would have to completly rewrite Roomba630 for your platform. I'll also point out that most of the high level control is run on a separate computer. There is some ip addresses that will probably need reconfiguring. I no longer use Pi4j but there is old code in the project for it. I expect you may have problems if it is not removed. If i get time this weekend I'll try to remove the Pi4j code. What time zone are you in, I'm GMT +10. |
I will also add some info to the readme on how to launch the code. I'd like to help you and document the process for others in the readme of this project. |
I will fork the project this weekend. I will say something next week. Cheers |
No problem, I've now removed pi4j and a few other libs from the code. haven't tested it though |
I will test it :) |
Good afternoon, I reviewed ´master´ branch and exist some compilation problems.
Basically, we have to review the existence of the class:
and the existence of the class I have just created a PR: Juan Antonio |
Hi @jabrena, OK, so I've resolved the issues with PointCouldUI and ParticleFilterStatus, they were in the test folder instead of the java folder. I accidentally committed back the pom.xml with my version of RPLidar, your version seems to be missing the continuous scan method which I had written and used in this project. You will not be able to run some of the junit tests, this is because I've been a bit lazy and used junit as a convenient way to launch code that interacts with the robot. I would like to change that, but I don't want to create merge conflicts for either of us. I was intending to convert these junits to be launched from the main entry point menu. If you are going to be focusing of the replacement of the Roomba code we shouldn't have any conflicts. So if its OK with you, I'll find some time to move and refactor these junit tests. |
I've just converted the MapBuilder junit to have a launch option from au.com.rsutton.entryPoint.Main. |
I will test everything tomorrow Thanks mate |
Hi observed the case with the dependency RPLidar. I think that you are using a local dependency in that case. I will publish in order to continue with the process. Juan Antonio |
Or put the library inside of this project. As you like :) |
Here is my pull request from earlier ev3dev-lang-java/RPLidar4J#3 I may have some subsequent fixes that are not in the pull request, but it certainly includes the continousScan method |
I am going to review now |
Hi mate, can you send the pull request to this branch? |
Released a new Snapshot version about the I have just created a new PR: |
Hi @rlsutton1, Although I can execute the class: What is the next steps to upgrade the project to add the initial support for EV3? Cheers Juan Antonio |
I observed when the application start that appear a predefined map:
Why? |
the predefined map is for testing without an actual robot attached. In MapBuilder if you set simulator = false, then it would try to use an actual robot and build a map from scratch IP addresses are configured in HazelCastInstance. with that done, you would start the robot (menu 0) on the eva3 and then start MapBuilder on your computer (menu 8). |
Found! HazelCastInstance()
{
String hostname;
InetAddress ip;
try
{
ip = InetAddress.getLocalHost();
hostname = ip.getHostName();
System.out.println("Your current IP address : " + ip);
System.out.println("Your current Hostname : " + hostname);
} catch (UnknownHostException e)
{
e.printStackTrace();
}
config = new Config();
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(true);
TcpIpConfig tcpIpConfig = config.getNetworkConfig().getJoin().getTcpIpConfig();
tcpIpConfig.setEnabled(true);
for (int i = 2; i < 22; i++)
{
tcpIpConfig.addMember("192.168.0." + i);
}
tcpIpConfig.addMember("10.10.0.41");
h = Hazelcast.newHazelcastInstance(config);
} |
In what class, I could change the communication from Roomba to EV3? |
I am going to sleep now. Tomorrow, I will check your notes. Cheers |
Note: The project has a good level of complexity. Congrats!!! |
A new question: Do you think that it is possible to save a map and load in a new session? |
Hi @rlsutton1, I re read again your note about Roomba:
I checked that package:
and the strategy is to teleoperate the robot from this project. In this sense, I could create something to do the same. I could create a client to wait for commands. I will create a new package:
Today, I will create a project to provide an interface from the brick to the desktop application |
Can you run java code on the brick and communicate over wifi? The code in roomba and roomba630 run on my robot, i would expect that you would implement your own version of roomba630 for the brick. My code already handles sending messages between the robot and a computer via wifi. You run one copy of the program on the brick and one on your computer. |
It will be possible to save a map and load it later for another session, but I have not bothered to write that code yet. I am still quite focused on improving the map building capabilities at the moment. |
Hi @rlsutton1,
Yes, of course. I am building the client for EV3. Example: Actuators:
Sensors:
I observed that in the class
To communicate with Roomba platform. Juan Antonio |
The minium set of methods that must be implemented by RoombaJSSC are: this is wrong --> void drive(rightWheelVelocity,leftWheelVelocity) - mm per second There is JavaDoc on these methods in RoombaJSSC and also they are well documented by Roomba OI all other methods could return fixed values - LIDAR distance is in CM |
What is the difference between drive and directDrive? |
My earlier statement about what drive does was incorrect. Drive specifies a speed and a turn radius. Here is text directly from the Roomba OI document about drive and direct drive Drive Opcode: 137 Data Bytes: 4 Drive Direct Opcode: 145 Data Bytes: 4 |
I've just committed a couple of fixes which would have impacted this issue.
With regard to the inverted distance, It never ceases to amaze me how tolerant a particle filter is of bad data. |
Hi,
I would like to test your project on EV3.
Any orientation to begin?
Juan Antonio
The text was updated successfully, but these errors were encountered: