I have problem using ros package aruco_detect. I am trying to show image with aruco markers in rviz but when i go add> by topic > /fiducial_images and select image i see only "no image" screen. The command i am using to call aruco_detect node:
rosrun aruco_detect aruco_detect /camera/compressed:=/usb_cam/image_raw/compressed /camera_info:=/usb_cam/camera_info
rqt_graph doesn't show /camera/compressed topic too.
I have checked rostopic echo /usb_cam/image_raw/compressed and it is publishing some data.
Related
I have ROS2 Foxy set up on an Ubuntu 20.04 machine. When using RQt, I am able to see all the topics on my network just fine and I am able to subscribe to all of them and even plot them on a live graph. However, publishing doesn't work correctly and always publishes null/default messages. For example, if I try to publish a Bool message with the data as "true" then it still publishes "false". Same with any numeric types - whatever number I try to publish, it always publishes 0. See the image for examples:
RQt screenshot
To debug, I have tried publishing these same messages from Python scripts and from the 'ros2 pub' command line utility. These always work just fine and my subscribers in RQt are able to see the correct values being published. Has anyone else dealt with this? What is the underlying cause and how to solve it? Is it perhaps fixed in ROS2 Galactic?
As user '2b-t' pointed out in the comments, this is an issue where working code was removed from rqt_publisher in the foxy-devel branch. So while RQt in ROS2 Foxy is broken, for now there is a workaround of cloning rqt_publisher into your ROS2 workspace and manually adding in the missing code. It's easy and there's an example pull request created by a github user 'coalman321' which shows how to revert the offending commit here (https://github.com/ros-visualization/rqt_publisher/pull/28/files).
Steps to fix:
cd into the src directory your ROS2 workspace
git clone https://github.com/ros-visualization/rqt_publisher.git
cd rqt_publisher
git checkout foxy-devel
git revert 367049ecc4ce3cab
cd back up to the root of your ROS2 workspace
colcon build --symlink-install --packages-up-to rqt_publisher
source install/local_setup.bash
Now when you run rqt and publish a non-null value, it should work correctly! You can monitor the value either from command line e.g. ros2 topic echo or from the Topic Monitor within RQt itself.
I am using ubuntu16.04 and trying to run opencv script.
when i use:
video_capture = cv2.VideoCapture(-1)
it gives me error VIDEOIO ERROR: V4L: can't find camera device
No video window opens
But when i run
video_capture = cv2.VideoCapture('test.jpg')
It opens window shows the picture and close the window.
Please tell me why it is not streaming video directly from camera.
The suggestion api55 gave in his comment
video_capture = cv2.VideoCapture(0)
is what I would try first.
Generally, you can list the available cameras with ls /dev/video* or v4l2-ctl --list-devices. Here sample output:
NZXT-U:rt-trx> v4l2-ctl --list-devices
Microsoft® LifeCam Cinema(TM): (usb-0000:00:14.0-1):
/dev/video1
Microsoft® LifeCam Cinema(TM): (usb-0000:00:1a.0-1.3):
/dev/video0
/dev/video0 corresponds to device id 0, etc.
PS: v4l2-ctl is quite useful for solving camera issues and can do much more than --list-devices. I installed it via packagev4l-utils on a 16.04 machine.
Late, but to get mine working i put in terminal:
-ltrh /dev/video*
To get a list of the video devices that are plugged into my computer. Then for each one I did:
sudo chmod 777 /dev/videox
Where x was one of the video files that were listed, giving everything access to them. Probaly not the most secure solution, but it got my code working.
Hi I have a BBB which is running on Angstrom 2013 image. For display purpose I am using a cape which is connected to gpio extensions. There is a Qt application running on BBB, which use to get displayed on the Cape.
How can I take screenshot of the cape.
I want to take some screen-shot of the running application.
I couldn't find gnome-screenshot on angstrom image, using import command to take screenshot I got an error regarding x11.
How can I get the screenshot?
You can try and install scrot
On Ubuntu based Beagle Bone Black, I installed it as follows:
sudo apt-get install scrot
To Capture a screenshot:
scrot -q 100 /home/debian/Desktop/Desktop.jpg
#-q 100 == best quality
# /home/debian/Desktop/Desktop.jpg is path where to store captured screenshot
For more information, you can read this tutorial here.
We use gazebo to simulate the kinect sensor. Is there any option to run the openni_tracker package without using the real sensor. When we try to run it
roslaunch openni_launch openni.launch load_driver:=false depth_registration:=true camera:=camera
rosrun openni_tracker openni_tracker
we have got the following error:
InitFromXml failed: Can't create any node of the requested type!
thank you all in advance
I want to add tcpdump into yocto build
I found that I need to add meta-networking into bblayers.conf. meta-networking is apart of meta-openembedded
Following are the steps I followed :
Downloaded complete meta-openembedded : git clone git#github.com:openembedded/meta-openembedded.git
Checked out to jethro branch and confirmed that meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb is present
Added meta-networking and its dependent packages into bblayers.conf
BBLAYERS
/home/linux/work/yocto/poky/meta-openembedded/meta-oe \
/home/linux/work/yocto/poky/meta-openembedded/meta-networking \
/home/linux/work/yocto/poky/meta-openembedded/meta-python \
Triggered full build and copied the images onto sdcard.
I am still unable to see tcpdump binary after booting up BBB(Beaglebone black). I am pretty sure I am missing something. I am new to yocto. Any guidance will be very helpful.
You need to add tcpdump to your image recipe. For a quick test, you add the following line to your conf/local.conf:
IMAGE_INSTALL_append = " tcpdump"
(Note the leading space in the assignment).
Just adding a layer won't add anything to your image.
Update:
In order to do do it correctly, you should add tcpdump to IMAGE_INSTALL in your own image recipe. Eg.
IMAGE_INSTALL += "tcpdump"
If you don't have your own image, you could add a <image-name>.bbappend file to your own layer, with the line above.