-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
247 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Launch Instructions for VectorNav with Permission Issues | ||
|
||
This document explains how to resolve permission issues for serial devices (like `/dev/ttyUSB0`) and launch the VectorNav package on Linux. | ||
|
||
## Prerequisites | ||
|
||
1. **Install Necessary Packages**: Ensure all required packages are installed in your workspace and that the workspace is correctly sourced. | ||
|
||
2. **Device Permissions**: You’ll need permission to access the device files (e.g., `/dev/ttyUSB0`). | ||
|
||
## Steps | ||
|
||
### Step 1: Check Device Permissions | ||
|
||
1. First, identify the device port: | ||
```bash | ||
ls /dev/ttyUSB* | ||
``` | ||
2. Verify your user has permission to access the device. If you see an error or permission denied, proceed with the steps below. | ||
|
||
### Step 2: Add User to the `dialout` Group | ||
|
||
The `dialout` group typically has access to serial devices. Add your user to this group: | ||
|
||
```bash | ||
sudo usermod -aG dialout $USER | ||
``` | ||
|
||
**Note**: Log out and log back in for the group change to take effect. Alternatively, you can restart the system to apply these changes immediately. | ||
|
||
### Step 3: Verify Permissions | ||
|
||
After re-logging or rebooting, check that you have read and write permissions on the device: | ||
|
||
```bash | ||
ls -l /dev/ttyUSB0 | ||
``` | ||
|
||
If permissions are set correctly, the output should show that `dialout` has `rw` (read/write) access for `/dev/ttyUSB0`. | ||
|
||
### Step 4: Launch VectorNav | ||
|
||
Source your ROS workspace, then launch the VectorNav nodes with the appropriate configurations: | ||
|
||
```bash | ||
source ~/Documents/urc/rover-colcon/install/setup.bash | ||
ros2 launch vectornav vectornav.launch.py | ||
``` | ||
|
||
**Note**: Replace the workspace path with the correct path if it’s different on your system. | ||
|
||
### Troubleshooting | ||
|
||
If you continue to experience issues with permissions, consider checking `dmesg` logs to ensure the device is recognized: | ||
|
||
```bash | ||
dmesg | grep ttyUSB | ||
``` | ||
|
||
This command shows messages related to the USB connection and may help diagnose connectivity issues. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
twist_mux: | ||
ros__parameters: | ||
topics: | ||
autonomous_navigation: | ||
topic: /cmd_vel_autonomous | ||
timeout: 10.0 | ||
priority: 1 | ||
teleoperation: | ||
topic: /cmd_vel_teleop | ||
timeout: 0.5 | ||
priority: 3 | ||
|
||
locks: | ||
autonomous_navigation: | ||
topic: /autonomous_disabled | ||
timeout: 0.0 | ||
priority: 2 | ||
e_stop: | ||
topic: /e_stop | ||
timeout: 0.0 | ||
priority: 255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ifndef TWIST_MUX | ||
#define TWIST_MUX | ||
|
||
#include "geometry_msgs/msg/twist_stamped.hpp" | ||
#include "std_msgs/msg/bool.hpp" | ||
#include "std_msgs/msg/string.hpp" | ||
#include <rclcpp/publisher.hpp> | ||
#include <rclcpp/rclcpp.hpp> | ||
#include <rclcpp_components/register_node_macro.hpp> | ||
|
||
namespace twist_mux | ||
{ | ||
class TwistMux : public rclcpp::Node | ||
{ | ||
public: | ||
explicit TwistMux(const rclcpp::NodeOptions & options); | ||
|
||
private: | ||
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr | ||
autonomous_subscriber; | ||
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr | ||
teleop_subscriber; | ||
|
||
rclcpp::Subscription<std_msgs::msg::Bool>::SharedPtr enabled_subscriber; | ||
|
||
rclcpp::Subscription<std_msgs::msg::String>::SharedPtr mode_subscriber; | ||
|
||
std::shared_ptr<rclcpp::Publisher<geometry_msgs::msg::TwistStamped>> | ||
cmd_publisher; | ||
|
||
bool enabled; | ||
std::string mode; | ||
}; | ||
} // namespace twist_mux | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.