HELLO!
How to integrate ROS and Pathplanner?
HELLO!
How to integrate ROS and Pathplanner?
We are going to need a little more information
Path Planner is an FRC specific tool, which in theory would be possible to use in ROS, but you are probably better off using something like global_planner.
If you really want/need to sue path planner in ROS, we will need to know what kind of robot are you running, an FRC robot with ROS? A custom robot with ROS?
We had previously decided to use the FRC robot pathplanner, but I could not find any resources on the internet, so I decided to write it here. At first, we thought of using a global planner, but we experienced some problems. Thank you for replying to my question.
Giving more details on what your overall goal is, what kind of robot, what hardware you are running, what challenge you are working on, would be very helpful.
Here are the pathplanner docs to look through: Home | PathPlanner Docs
This system design shows the components and software used in the design of robotic systems. Path Planner will perform path planning operations with sensor data, Neo (Kraken) swerve motors will control the movement of the robot, and Arduino microcontroller will ensure the operation of the systems.
There’s alot of conflicting information here
If the Arduino is the main control board how will this run Java/C++ code for pathplanner/etc or the ROS master?
Are they Neo motors or Krakens? Two very different kinds of motors with different libraries for controlling them. Krakens are part of CTREs motor controller (TalonFX) which can be controlled outside of FRC projects using the Phoenix stuff. Prepare Linux Robot Controller — Phoenix documentation this still requires some sort of full Linux board to run on like a Raspberry Pi or Jetson Nano and a way to convert the CAN to USB for the SBC to take in. Arduino does not support this by default or supply a way to take in CAN natively.
Finally unless I don’t fully understand PathPlanner it is not going to combine sensor data from lidar or other types of sensors to do obstacle avoidance like Global Planner and Local Planner do in the ROS nav stack. Those are meant to listen to Odometry and other sensor input topics and handle it ‘auto magically’.
We need a full description of what is being accomplished here because there’s too many conflicting pieces of information
ARDUINO
It won’t be used but I don’t know what to use (let’s assume it supports it hypothetically)
We have NEO engines, a few of them are Kraken, they were thinking of using them together, I don’t have any information about whether they work together (that’s not my field anyway)
I copied the text. We will use Raspberry Pi. I don’t know much about the subject. My partner knows more, but I can’t reach him. I’m just trying to learn. I’m sorry I’m making you struggle, too
What are you doing this project for?
for FRC regionals
For an FRC robot your main control board is the RoboRio (grey square), this will connect via CAN to your motor controllers (Neo uses a spark max, Kraken the controller is part of the motor). The CAN is just your signal wire. Power comes from the battery through the Power Distribution board (hub or panel) to the RoboRio and directly to the motor controllers.
This is the core of your robot. The software you run on top of it can vary from team to team and the type of robot you have. You mentioned swerve drive so you have a few options to help do some of the hard work for you.
If it’s a full Rev Max Swerve (no krakens) there is an existing example project that works out of the box for the basics of controlling the robot in Tele-Op or controlling the individual swerve modules. You would add path planner on top of this to set paths you define in advance. Those paths are run during autonomous or from functions you set up in your code. The paths that are made can be altered and changed from sensor data, but you do this yourself and ‘generate’ a new trajectory. It is not something path planner does automatically.
If it’s a generic swerve you can use YAGSL and configure it for your specific hardware.
If it’s a full CTRE swerve you can use the swerve generator tool they provide.
It sounds like your team needs to possibly step back and understand the basic control system and how it will work for your robot before jumping into advanced topics like obstacle avoidance.
Thank you for your return. I will take them all into consideration. There are people in our team who are knowledgeable about these, but they want us to research and find them ourselves.
I think I made a mistake (like skipping a few steps) I want to say it again, sorry for disturbing you.
All good! Everyone was where you are at some point, asking questions is a good way to learn!
You may want to look at https://docs.wpilib.org it has all the basics you should learn for an FRC robot.
Good luck! Feel free to ask for help here if you get stuck!
If you are not very very confident in programming in general and programming and FRC bot specifically I highly recommend you stick with WPILib. WPILib is absolutely amazing and I cannot thank the amazing volunteers enough.
But, If you really want to look into ROS here you go GitHub - Ninjineers-2383/pathplanner_ros
This thread was just posted and is a perfect visual representation of what I was describing with how the control system is wired and help you picture what components you have and how they are connected. Once you see it visually it starts to click more! That’s how I learned it for 2015 when the new kit came out.