dheera / ros-pwm-pca9685

ROS package for PCA9685 16-channel PWM driver, used in motor and LED applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I actually make this a ROS node?

UberWagen opened this issue · comments

Showing my colors here, but I'm new to ROS. I have ROS setup and running, receiving inputs from a joy_node I've configured that's taking in inputs from an Xbox One S controller (bluetooth). What I'd like to do is relay those inputs to this PCA9685 node to drive two motors and a steering servo.

I bought a WaveShare JetRacer kit that comes with a "JetCard" distro/jupyter notebook that's kind of watered down and had a lot of functions that weren't working, so I decided to just load JetPack and try some stuff for myself. There's a battery+oled+SCL/SDA "hat" that comes with the JetRacer which has most stuff being driven over i2c. I've been able to drive the motors and steering rack using the servokit and motorkit package from adafruit in a terminal just to test their functionality.

Where I'm running into a snag is trying to pull those "kits" into ROS, which is where I found you! I just need to figure out how to turn this into a node so I can start testing things from ROS.

Oh my...egg on face moment here. I've been so used to calling python scripts in ros that I kept attaching .cpp during the rosrun command.

If anyone else makes this same mistake, try:
$rosrun pwm_pca9685 pca9685_node

No need to add the file type if it's not python.