Closed mendax1234 closed 3 years ago
PathWeaver is designed for differential drive. I have not personally used it for swerve but I know others have.
So, my question is how to drive a trajectory for a swerve. For example , if l want to draw a bounce path. l should draw like below?
I think instead of one continuous path you would want to separate it into multiple paths. This would allow the point turn that I think you want instead of a rounded turn (not sure how big the rounding would be in practice probably depends on your swerve) which is what I think you would get now.
Besides, how can l control the head of my robot?
I don't think we can answer this without more information about how your robot is coded and what you are trying to do.
First , what is the whole length of such the whole field. For instance, just take the picture above as an example . What is the length between the start zone and the finish zone?
The length of the field is whatever is setup for the field image you are using. Here is the article on setting up a custom field image you can see the length is specified. In the case above the field is the 2021 at-home challenges (see 2.4.4) which are 15' by 30'
Second, is this trajectory the same with the waypoint like the example code below
You copied the example in the trajectory tutorial. That is for manually specifying the waypoints. To use PathWeaver you would import the trajectory generated by PathWeaver
For example, how is the 8.5 got using the P and D value from the characterization tool.
I actually opened an issue for this problem a while back. Unfortunately since the characterization tool is being replaced with the new SysID tool there hasn't been a lot of interest in updating this.
At last , l wonder how to deploy the robot code in charavterization tool if l only can connect to the robot wifi. (l cannot connect to the Internet and RoboRio at the same time)
I don't understand what wifi has to do with it. The characterization tool doesn't need wifi. The tool even has "deploy project" built in.
Did this make sense? Do you have additional questions?
Sorry for replying so late since l have had a test recently.
I think instead of one continuous path you would want to separate it into multiple paths.
But , how many paths should l seperate it ? Is there any requirements? Or , it just depend on my mood?
I suggest you create a new path every time there is a discontinuity (in this case a change in direction). Here is what our path for bounce looked like (this is for a tank drive so we needed to also set the reversed flag).
I suggest you create a new path every time there is a discontinuity (in this case a change in direction). Here is what our path for bounce looked like (this is for a tank drive so we needed to also set the reversed flag).
Sorry for replying so late , since l have been really busy recently.
So, l have an idea that l can modify each picture's .json file to adjust the unit of its total length? Is that right? Besides , What does imaginary line mean and how to draw it ?
Any help is appreciated!
l have recently run into this error. l didn't run into it before . And l have changed nothing. What's the matter?
What version of WPILib is this with?
What do you mean by "imaginary line"?
You are looking to modify the field image, why do you want to do that?
What version of WPILib is this with?
2021.2.2
What do you mean by "imaginary line"?
You are looking to modify the field image, why do you want to do that?
Maybe this.
What version of WPILib is this with?
Do l need to reinstall the WPILIB?
There are multiple lines in that picture which are you referring to?
I think a reinstall of WPILib is premature. Do you have the code that is producing the error posted?
There are multiple lines in that picture which are you referring to?
The middle one.
And the code is here.
It seems that l can't upload the .zip
Can you upload it to its own github repo?
I still don't understand which line.
The blue lines control the curvature at each waypoint.
The dashed brown line indicates the robot going in reverse.
The green line is the robot going forward.
The grey lines are a part of the field used for dimensioning.
Can it now been seen?
In the future please use Github to post code as it is much easier for us to look at.
You mentioned above that you were modifying the .json files. How are you modifying them? Why are you modifying them? Does it load fine with an unmodified file?
In the future please use Github to post code as it is much easier for us to look at.
Since the repository is now private , l will public it maybe next year when the 2022 season is over. Sorry for that.
You mentioned above that you were modifying the .json files. How are you modifying them? Why are you modifying them? Does it load fine with an unmodified file?
l have found that the problem is in the photonlib.json. Since l can't install photonlib from online . So l download it directly and copy it to the venderdeps. However , it seems that the code built well , but the auto can't work . So l copy another photonlib.json which l have successfully downloaded with WPILIB 2021.3.1 in May to the venderdeps and now it works well , nothing goes wrong.
frc-characterization is/was deprecated. We have replaced it with SysID which is much more user friendly. I am not sure exactly what you are looking to tune for your swerve but it should help.
Can l use it now? Or do l need to wait until the 2022 version is launched?
Yes it is fully functional now and will ship as part of the 2022 season. You can use it now via either the instructions linked or as part of the FRC beta testing!
Hello , l have run into a problem recently. We draw a straight line in Pathweaver and load it successfully. However , when l enable the autonomous mode , the swerve will rotate but l don't let it rotate . It's strange.
Lets keep issues separate so they are trackable instead of just keep adding onto this issue.
I don't understand what "the swerve will rotate but l don't let it rotate" means. Before using PathWeaver you should be verifying that you can run simple trajectories like this one, have you done that?
Lets keep issues separate so they are trackable instead of just keep adding onto this issue.
I don't understand what "the swerve will rotate but l don't let it rotate" means. Before using PathWeaver you should be verifying that you can run simple trajectories like this one, have you done that?
l have tested it . l don't change any parameters , and draw 3 trajectories. It seems that it works well (But does it mean that l don't need to test the parameters?) . However , when it finished one trajectory, it will stop suddenly and then go another trajectory. I would like it to be continuous. Should l draw it in one trajectory?
Describe the question you have. A clear and concise description of what you want clarification on.
Describe the reason for your confusion. A clear and concise description of why the question requires clarification and what's confusing.
Is your question related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Additional context Add any other context or screenshots about the question here.