-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* read messages from base station * sending RTCMs over ros * launch file with both GPSs, RTCMs successfully transmitted * port change * output screen * added gps driver for rover gps and merged master into rtk * edited rtk launch and esw.yaml * used pyubx reader instead of serial getline() * added preliminary dual gnss file * add notes * graph vectors for heading calculations * calc heading and bearing * driver testing; not fully working 👽 * plots for heading calculations * added get_heading_vector function * add tests for vector heading method * working as intended furing testing * add tests to determine optimal amt of sig figs for gps coordinates * added more message parsing * started adding gps to gazebo * finished adding new gps and links * edited links * added links * try to debug plugins and make test subscriber file * added left and right gps using groups * gps creation and subscribers * add tests for moving gps and subscribed * started editing gps linearization * gps now put in sim * edited test subscriber * added pose calculation using heading * tests for both gps distance * changes for testing with convert lat long to cartesian to see offset better * tests for offset * offset is 10? * chanegd offset to 1 and modified testing code * Add requirements * updated linearlization * debug linearization function and try to debug sim * fixed reference points and removed z component for better rviz experience * made a temporary GPS sim * fixed pose publishing offset temporarily * Add starter work for gps * cartesian to geodetic conversion * Finish off gps and add imu * Yo workingin the new sim * Submodule update for dawn * added rviz to launch file, misc cleanup * refactored utils and tag detector, crashes when it sees a tag * debugging * Init * Work on encoders * Update * Breh * Use bgra instead of i420 * partially fixed script * fixed macos std::for_each error * more factoring test * refactored SE3 util functions back into lie library * refactored most of sim * more debugging * Add manif as submodule, find out some disgustig things about transforms, normalize some vars before so3d ctor * refactored camera controls using tangent elements * pr cleanup * more cleanup * more cleanup * Remove unrelated stuff, clean up some stuff, remove old lie stuff * Rename to lie.hpp * Refactor look controls * Comments * Manif refactor (#648) * Fix collider rendering with new se3 * slight refactoring of simulated sensors, added untested noise * changed some type names, added rviz to launch file, separate roll pitch yaw noises * fixed type names and ctors * slightly reduced noise and moved waypoint * Restream * Update * Fix format * Stream that can be reused * Naming --------- Co-authored-by: Riley Bridges <[email protected]> Co-authored-by: nehakankanala <[email protected]> Co-authored-by: Pearl Lin <[email protected]> Co-authored-by: dllliu <[email protected]> Co-authored-by: Rahul <[email protected]> Co-authored-by: umroverPerception <[email protected]> Co-authored-by: Riley Bridges <[email protected]>
- Loading branch information
1 parent
edddf01
commit 5e91527
Showing
45 changed files
with
633 additions
and
560 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,12 @@ | |
url = https://dawn.googlesource.com/dawn | ||
shallow = true | ||
branch = chromium/6108 | ||
[submodule "deps/emsdk"] | ||
path = deps/emsdk | ||
url = [email protected]:emscripten-core/emsdk.git | ||
shallow = true | ||
branch = 3.1.53 | ||
[submodule "deps/manif"] | ||
path = deps/manif | ||
url = https://github.com/artivis/manif.git | ||
shallow = true |
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,5 @@ | ||
#!/bin/bash | ||
|
||
source deps/emsdk/emsdk_env.sh | ||
emcmake cmake -B src/teleoperation/streaming/embuild -G Ninja -DCMAKE_BUILD_TYPE=Release src/teleoperation/streaming/ | ||
cmake --build src/teleoperation/streaming/embuild |
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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
# !/usr/bin/env bash | ||
# !/usr/bin/env zsh | ||
|
||
# Script to add or remove ROS basestation networking script from bashrc | ||
# TODO: make this work for bash and other catkin workspace locations | ||
|
||
if grep -q "source ~/catkin_ws/src/mrover/ansible/roles/basestation_networks/files/networking_setup_basestation.sh" ~/.zshrc; then | ||
CATKIN_WORKSPACE_PATH=~/catkin_ws | ||
network_script_path="${CATKIN_WORKSPACE_PATH}/src/mrover/ansible/roles/basestation_networks/files/networking_setup_basestation" | ||
enable_message="Basestation network setup enabled, disable with scripts/toggle_basestation_networking" | ||
|
||
if grep -q "source ${network_script_path}" ~/.zshrc; then | ||
echo "Removing basestation networking script from .zshrc" | ||
sed -i '/source ~\/catkin_ws\/src\/mrover\/ansible\/roles\/basestation_networks\/files\/networking_setup_basestation.sh/d' ~/.zshrc | ||
else | ||
echo "Adding basestation networking script to .zshrc" | ||
echo "source ~/catkin_ws/src/mrover/ansible/roles/basestation_networks/files/networking_setup_basestation.sh" >> ~/.zshrc | ||
if [[ $(tail -c1 ~/.zshrc | wc -l) -eq 0 ]]; then | ||
echo "\n" >> ~/.zshrc | ||
fi | ||
echo "echo '${enable_message}'" >> ~/.zshrc | ||
echo "source ${network_script_path}" >> ~/.zshrc | ||
fi |
This file was deleted.
Oops, something went wrong.
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,84 @@ | ||
#include "hardware_h265_encoder.hpp" | ||
|
||
#include <ros/init.h> | ||
#include <ros/node_handle.h> | ||
#include <ros/subscriber.h> | ||
#include <sensor_msgs/Image.h> | ||
#include <sensor_msgs/image_encodings.h> | ||
|
||
#include <streaming.hpp> | ||
|
||
#include <opencv2/imgcodecs.hpp> | ||
#include <opencv2/imgproc.hpp> | ||
#include <opencv2/videoio.hpp> | ||
|
||
std::optional<StreamServer> streamServer; | ||
|
||
std::optional<Encoder> encoder; | ||
|
||
auto imageCallback(sensor_msgs::ImageConstPtr const& msg) -> void { | ||
try { | ||
if (msg->encoding != sensor_msgs::image_encodings::BGR8) throw std::runtime_error{"Unsupported encoding"}; | ||
|
||
cv::Size size{static_cast<int>(msg->width), static_cast<int>(msg->height)}; | ||
|
||
if (!encoder) encoder.emplace(size); | ||
|
||
cv::Mat bgrFrame{size, CV_8UC3, const_cast<std::uint8_t*>(msg->data.data()), msg->step}; | ||
cv::Mat bgraFrame; | ||
cv::cvtColor(bgrFrame, bgraFrame, cv::COLOR_BGR2BGRA); | ||
|
||
bool feedSuccessful = false; | ||
{ | ||
Encoder::BitstreamView view = encoder->feed(bgraFrame); | ||
std::span span{static_cast<std::byte*>(view.lockParams.bitstreamBufferPtr), view.lockParams.bitstreamSizeInBytes}; | ||
feedSuccessful = streamServer->feed(span); | ||
} | ||
if (!feedSuccessful) encoder.reset(); | ||
|
||
} catch (std::exception const& e) { | ||
ROS_ERROR_STREAM(std::format("Exception encoding frame: {}", e.what())); | ||
ros::requestShutdown(); | ||
} | ||
} | ||
|
||
// auto capture() -> void { | ||
// cv::VideoCapture cap{std::format("v4l2src ! videoconvert ! video/x-raw,width={},height={},format=I420,framerate=30/1 ! appsink", 640, 480), cv::CAP_GSTREAMER}; | ||
// if (!cap.isOpened()) throw std::runtime_error{"Failed to open capture"}; | ||
// | ||
// while (cap.isOpened()) { | ||
// cv::Mat i420Frame; | ||
// if (!cap.read(i420Frame)) throw std::runtime_error{"Failed to read frame"}; | ||
// | ||
// cv::Mat bgraFrame; | ||
// cvtColor(i420Frame, bgraFrame, cv::COLOR_YUV2BGRA_I420); | ||
// | ||
// Encoder::BitstreamView view = encoder->feed(bgraFrame); | ||
// std::span span{static_cast<std::byte*>(view.lockParams.bitstreamBufferPtr), view.lockParams.bitstreamSizeInBytes}; | ||
// streamServer->feed(span); | ||
// | ||
// ros::spinOnce(); | ||
// } | ||
// } | ||
|
||
auto main(int argc, char** argv) -> int { | ||
try { | ||
ros::init(argc, argv, "software_h265_encoder"); | ||
ros::NodeHandle nh, pnh{"~"}; | ||
|
||
std::string imageTopic = pnh.param("image_topic", std::string{"/camera/left/image"}); | ||
|
||
streamServer.emplace("0.0.0.0", 8080); | ||
|
||
ros::Subscriber imageSubscriber = nh.subscribe(imageTopic, 1, imageCallback); | ||
|
||
// capture(); | ||
|
||
ros::spin(); | ||
return EXIT_SUCCESS; | ||
|
||
} catch (std::exception const& e) { | ||
ROS_ERROR_STREAM(std::format("Exception initializing: {}", e.what())); | ||
return EXIT_FAILURE; | ||
} | ||
} |
Oops, something went wrong.