Kotlin Android Interface for NVIDIA Jetson AI Navigation
This tutorial builds a Kotlin supervisory interface for a robot whose navigation stack runs on NVIDIA Jetson.
Architecture
Kotlin Android
↓
Navigation API
↓
Jetson Gateway
↓
ROS 2 Navigation
↓
Localization + Planning
↓
Robot Base
1. Define navigation commands
data class Pose2D(
val x: Double,
val y: Double,
val yaw: Double
)
sealed interface NavigationCommand {
data class GoTo(val pose: Pose2D) : NavigationCommand
data object Cancel : NavigationCommand
}
2. Send a goal
Android should send a high-level goal instead of directly controlling individual motors during autonomous navigation.
interface NavigationClient {
suspend fun sendGoal(pose: Pose2D)
suspend fun cancelGoal()
}
3. Receive navigation state
enum class NavigationState {
IDLE, PLANNING, MOVING, ARRIVED, FAILED
}
Expose this through StateFlow.
4. Visualize a map
The Android UI can display:
- Robot position
- Goal position
- Planned route
- Obstacles
- Localization state
The actual navigation computation remains on Jetson.
5. Add cancellation
Button(onClick = {
viewModel.cancelGoal()
}) {
Text("Cancel Navigation")
}
Cancellation should be sent to the robot navigation stack and confirmed by a robot-side state update.
6. Handle navigation failures
Examples:
NO_LOCALIZATION
GOAL_BLOCKED
PLANNER_FAILED
ROBOT_TIMEOUT
SAFETY_STOP
Do not turn these into generic "failed" messages; meaningful error states make robot operations easier to diagnose.
Conclusion
Kotlin works well as a human-facing navigation layer while Jetson and ROS 2 execute perception, localization, planning, and control.
References
- NVIDIA Isaac ROS: https://developer.nvidia.com/isaac/ros
- NVIDIA Isaac: https://developer.nvidia.com/isaac
Useful Links
Website: www.v-modal.com
SDK Flutter: https://github.com/v-modal/vmodal_sdk_flutter
SDK Android: https://github.com/v-modal/vmodal_sdk_android
Discord: https://discord.gg/K72z28KUx
Top comments (0)