Takin_motors is a node that listen to a twist/cmd_vel message to control the drive which in then control the motors. It also publish informations about the motors. The motors use the CANBus interface on the development board of the Nvidia Jetson TX2.
A typical setup to be up and ready to use needs 4 steps :
-
Setup on the Jetson :
- Jetson must be powered on.
- The kernel modules must be enable.
- The interfaces must be configured.
- The interfaces must be enable.
This section is automated inside the takin_bringup/config/init.sh script.
-
Powering the boards
- The CANBus board need to be powered.
- The board have a ISO 1050 TX chip which is the transceiver for the CANBus interface. This chip need to be powered on both side. See the documentation for more information.
- The CANBus board need to be powered.
-
Powering the drives and motors
- Both the drives and motors need to be powered independently.
- Specially the drives need to be blinking and flashing red/off alternatively.
- Both the drives and motors need to be powered independently.
-
Detecting the CANBus
- Once everything is configure and powered. We can use the command
cangen -v -v -n 10 can0
This command is use to generate random noise on the CANBus so that the drive will detect it. This operation will be automated in the future.
Now the setup should be done and you can start using takin_motor to control the robot.
As if this node wasn't complicated enough, we have two host to manage for the motors to be able to work. Hopefully this part will be automated through launch file.
On the operating station, the execution sequence will depend on how you plan to communicate with the robot. There's two way to do this, the first way is through ROS node and the second is through the Web-UI.
The ROS node method might be a little bit more complicated for the uninitiated to the ROS environment. What you need to do is only to launch the controller node to talk to the robot. Also make sure that the game controller is connecter and detected on your machine before this.
There's only one command that you need to execute for that to work.
Inside a terminal with the Capra workspace properly configure, you need
type and launch this command :
roslaunch takin_bringup teleop.launch
This might change soon with the automation of the execution.
This command launch the necessaries ROS node for the transmission of the
game controller data.
Next on the robot, once connected through SSH, what you want to do is
very similar to the ROS node method that you did on the operating station.
Once you're connected go to the Capra workspace and source it. Next you'll
type and execute this command :
roslaunch takin_motors motors_remote.launch
We use the CTRE Phoenix API (ver 2018_v14) to communicate to the drive and control the motors.
takin_motors use the temp.msg message to publish the temperature of the drive. In the future it'll use the takin_remote_controller for manual navigation. ##Troubleshooting
For troubleshooting, you can use the package can-utils, which you can download through apt. This package contain tools to interact with the CANBus interface.
For troubleshooting, you can use the package can-utils, which you can download through apt. This package contain tools to interact with the CANBus interface.
There's also information that you can get from the dmesg
command to
see if the kernel is correctly configure and that the CANBus interface
are correctly setup.