Skip to content

Commit

Permalink
Get the arm imported properly as a urdf. arm_rviz_display.launch work…
Browse files Browse the repository at this point in the history
…s now
  • Loading branch information
qhdwight committed Oct 2, 2023
1 parent 77daff9 commit f6f4ce5
Show file tree
Hide file tree
Showing 20 changed files with 230 additions and 376 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,11 @@ else ()
target_precompile_headers(zed_nodelet PRIVATE src/perception/zed_wrapper/pch.hpp)
target_include_directories(zed_nodelet SYSTEM PRIVATE ${ZED_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS})
target_link_libraries(zed_nodelet PRIVATE ${ZED_LIBRARIES} ${OpenCV_LIBRARIES} ${SPECIAL_OS_LIBS} lie)
target_compile_definitions(zed_nodelet PRIVATE MROVER_IS_NODELET)
target_compile_options(zed_nodelet PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>)
target_compile_definitions(zed_nodelet PRIVATE
MROVER_IS_NODELET # Generate code relevant to nodelet
ALLOW_BUILD_DEBUG # Ignore ZED warnings about Debug mode
__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ # Eigen includes some files it should not, ignore
)
endif ()
endmacro()
endif ()
Expand Down
250 changes: 61 additions & 189 deletions config/rviz/arm.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Panels:
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /Grid1
- /MotionPlanning1
- /MotionPlanning1/Scene Geometry1
- /MotionPlanning1/Scene Robot1
- /RobotModel1
Splitter Ratio: 0.5
Tree Height: 336
Tree Height: 871
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expand Down Expand Up @@ -51,184 +51,60 @@ Visualization Manager:
Z: 0
Plane: XY
Plane Cell Count: 100
Reference Frame: world
Reference Frame: base_link
Value: true
- Acceleration_Scaling_Factor: 0.1
Class: moveit_rviz_plugin/MotionPlanning
- Alpha: 1
Class: rviz/RobotModel
Collision Enabled: false
Enabled: true
Move Group Namespace: ""
MoveIt_Allow_Approximate_IK: false
MoveIt_Allow_External_Program: false
MoveIt_Allow_Replanning: false
MoveIt_Allow_Sensor_Positioning: false
MoveIt_Planning_Attempts: 10
MoveIt_Planning_Time: 5
MoveIt_Use_Cartesian_Path: false
MoveIt_Use_Constraint_Aware_IK: false
MoveIt_Workspace:
Center:
X: 0
Y: 0
Z: 0
Size:
X: 2
Y: 2
Z: 2
Name: MotionPlanning
Planned Path:
Color Enabled: false
Interrupt Display: false
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
aTob:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
bToc:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
base_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
cTod:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
chassisToa:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
dToe:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
eTof:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
hand:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
world:
Alpha: 1
Show Axes: false
Show Trail: false
Loop Animation: false
Robot Alpha: 0.5
Robot Color: 150; 50; 150
Show Robot Collision: false
Show Robot Visual: true
Show Trail: false
State Display Time: 3x
Trail Step Size: 1
Trajectory Topic: move_group/display_planned_path
Use Sim Time: false
Planning Metrics:
Payload: 1
Show Joint Torques: false
Show Manipulability: false
Show Manipulability Index: false
Show Weight Limit: false
TextHeight: 0.07999999821186066
Planning Request:
Colliding Link Color: 255; 0; 0
Goal State Alpha: 1
Goal State Color: 250; 128; 0
Interactive Marker Size: 0
Joint Violation Color: 255; 0; 255
Planning Group: ""
Query Goal State: true
Query Start State: false
Show Workspace: false
Start State Alpha: 1
Start State Color: 0; 255; 0
Planning Scene Topic: move_group/monitored_planning_scene
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
a_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
b_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
base_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
c_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
d_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
e_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
Name: RobotModel
Robot Description: robot_description
Scene Geometry:
Scene Alpha: 0.8999999761581421
Scene Color: 50; 230; 50
Scene Display Time: 0.009999999776482582
Show Scene Geometry: true
Voxel Coloring: Z-Axis
Voxel Rendering: Occupied Voxels
Scene Robot:
Attached Body Color: 150; 50; 150
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
aTob:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
bToc:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
base_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
cTod:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
chassisToa:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
dToe:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
eTof:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
hand:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
world:
Alpha: 1
Show Axes: false
Show Trail: false
Robot Alpha: 0.5
Show Robot Collision: true
Show Robot Visual: false
TF Prefix: ""
Update Interval: 0
Value: true
Velocity_Scaling_Factor: 0.1
Visual Enabled: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: chassisToa
Frame Rate: 30
Fixed Frame: base_link
Frame Rate: 60
Name: root
Tools:
- Class: rviz/Interact
Expand All @@ -251,37 +127,33 @@ Visualization Manager:
Views:
Current:
Class: rviz/Orbit
Distance: 103.44278717041016
Distance: 65.38457489013672
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: -1.1320419311523438
Y: 0.6890945434570312
Z: -1.7296075820922852
X: 5.594668865203857
Y: 0.6798133850097656
Z: 3.844665288925171
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.13748864829540253
Pitch: 0.42248857021331787
Target Frame: <Fixed Frame>
Yaw: 2.7814881801605225
Yaw: 1.0014894008636475
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 948
Height: 1085
Hide Left Dock: false
Hide Right Dock: true
MotionPlanning:
collapsed: false
MotionPlanning - Trajectory Slider:
collapsed: false
QMainWindow State: 000000ff00000000fd0000000400000000000001f30000031bfc020000000dfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000018d000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e006701000001d0000001880000017d00fffffffb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000001600000016fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e006701000001cb00000188000000000000000000000001000001000000035dfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003b0000035d000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000078000000039fc0100000002fb0000000800540069006d0065010000000000000780000003bc00fffffffb0000000800540069006d00650100000000000004500000000000000000000005870000031b00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
QMainWindow State: 000000ff00000000fd0000000400000000000001f3000003a4fc020000000dfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d000003a4000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e006701000001d0000001880000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e006701000001cb00000188000000000000000000000001000001000000035dfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003b0000035d000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000062600000039fc0100000002fb0000000800540069006d0065010000000000000626000003bc00fffffffb0000000800540069006d006501000000000000045000000000000000000000042d000003a400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
Expand All @@ -290,6 +162,6 @@ Window Geometry:
collapsed: false
Views:
collapsed: true
Width: 1920
X: 0
Y: 27
Width: 1574
X: 177
Y: 89
9 changes: 4 additions & 5 deletions src/perception/tag_detector/tag_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace mrover {
void TagDetectorNodelet::onInit() {
mNh = getMTNodeHandle();
mPnh = getMTPrivateNodeHandle();
mDetectorParams = new cv::aruco::DetectorParameters();
auto defaultDetectorParams = cv::aruco::DetectorParameters::create();
mDetectorParams = cv::makePtr<cv::aruco::DetectorParameters>();
auto defaultDetectorParams = cv::makePtr<cv::aruco::DetectorParameters>();
int dictionaryNumber;

mNh.param<bool>("use_odom_frame", mUseOdom, false);
Expand All @@ -15,16 +15,15 @@ namespace mrover {
mNh.param<std::string>("camera_frame", mCameraFrameId, "zed2i_left_camera_frame");

mPnh.param<bool>("publish_images", mPublishImages, true);
using DictEnumType = std::underlying_type_t<cv::aruco::PREDEFINED_DICTIONARY_NAME>;
mPnh.param<int>("dictionary", dictionaryNumber, static_cast<DictEnumType>(cv::aruco::DICT_4X4_50));
mPnh.param<int>("dictionary", dictionaryNumber, static_cast<int>(cv::aruco::DICT_4X4_50));
mPnh.param<int>("min_hit_count_before_publish", mMinHitCountBeforePublish, 5);
mPnh.param<int>("max_hit_count", mMaxHitCount, 5);
mPnh.param<int>("tag_increment_weight", mTagIncrementWeight, 2);
mPnh.param<int>("tag_decrement_weight", mTagDecrementWeight, 1);

mIt.emplace(mNh);
mImgPub = mIt->advertise("tag_detection", 1);
mDictionary = cv::aruco::getPredefinedDictionary(dictionaryNumber);
mDictionary = cv::makePtr<cv::aruco::Dictionary>(cv::aruco::getPredefinedDictionary(dictionaryNumber));

mPcSub = mNh.subscribe("camera/left/points", 1, &TagDetectorNodelet::pointCloudCallback, this);
mServiceEnableDetections = mNh.advertiseService("enable_detections", &TagDetectorNodelet::enableDetectionsCallback, this);
Expand Down
1 change: 1 addition & 0 deletions src/teleoperation/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dist
dist-ssr
coverage
*.local
bun.lockb

/cypress/videos/
/cypress/screenshots/
Expand Down
4 changes: 2 additions & 2 deletions starter_project/autonomy/src/perception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ namespace mrover {
// TODO: uncomment me!
// mTagPublisher = mNodeHandle.advertise<StarterProjectTag>("tag", 1);

mTagDetectorParams = cv::aruco::DetectorParameters::create();
mTagDictionary = cv::aruco::getPredefinedDictionary(0);
mTagDetectorParams = cv::makePtr<cv::aruco::DetectorParameters>();
mTagDictionary = cv::makePtr<cv::aruco::Dictionary>(cv::aruco::getPredefinedDictionary(0));
}

void Perception::imageCallback(sensor_msgs::ImageConstPtr const& image) {
Expand Down
Loading

0 comments on commit f6f4ce5

Please sign in to comment.