Comments (4)
@vidaaudrey thanks for quick response! We have some redux storage which is filled during time (up to one minute) with ROS data. Then we want to allow relocalize a robot with drag&drop + rotate, so user can interact with robot component with mouse multiple times drag&drop + rotation. Looks like it may work for us, will check and let you know!
from webviz.
Hi @artvichi thank you for filing the issue. The quick way to fix it is to remount Worldview whenever the camaraState changes between controlled and uncontrolled:
const onCameraStateChange = useCallback(newCamState => {
setCameraState(newCamState);
}, []);
// use key to mount a different Worldview when it changed between controlled and uncontrolled
const camProps = shouldNotMoveCam
? { cameraState, key: 0 }
: {
cameraState,
onCameraStateChange,
key: 1
};
return (<Worldview {...camProps}> </Worldview>);
Codesandbox link.
Currently we are not expecting people to switch between controlled and uncontrolled very often. So the camera set up only happens once during the component life cycle. I'm curious what's your use case and how frequent is the switch? If that's a common case, we might update the Worldview internally to support it.
from webviz.
@artvichi did this end up working? Btw, I'm trying to get to know our open source community better, and would love to learn more about what you use Worldview/Webviz for. Could you perhaps shoot me an email at [email protected]?
from webviz.
I had the same problem, my workaround is using ref for the condition in the handler.
...
const [disableCamera, setDisableCamera] = useState(false);
const disableCameraRef = useRef(false);
disableCameraRef.current = disableCamera;
...
return <Worldview
...
onCameraStateChange={state => !disableCameraRef.current && setCameraState(state) }
></Worldview>
from webviz.
Related Issues (20)
- Delayed laserscans when clock times are out of sync HOT 1
- Bag not available HOT 2
- How large rosbag can webviz remote load?
- Consume React components directly HOT 3
- Errors when bootstraping the app HOT 1
- Error in fetching topics and datatypes HOT 1
- npm run bootstrap error
- Wrong visulization when coordinate values are large HOT 1
- Please update the invite HOT 1
- Pause button does not work HOT 2
- Why is the setting for transparency not working? HOT 1
- Can this this application be used as a part of custom application
- Can this application be used as a part of custom application? HOT 2
- Which node version should be used under Windows
- Information on the audio panal?
- Wrong Numeric Interpretation: how to fix? HOT 1
- ROS Demo.bag not available HOT 1
- /dist/vendor.js" Error (404): "Not found HOT 1
- root@ build-static-webviz: `lerna run build && rm -rf __static_webviz__ && cp -r docs/public/app __static_webviz__ && rm __static_webviz__/index.html && cp packages/webviz-core/public/index.html __static_webviz__/index.html && sed -i -- 's/\/dist\/webvizCoreBundle.js/webvizCoreBundle.js/' __static_webviz__/index.html && NODE_ENV=production STATIC_WEBVIZ=true webpack`
- Error: Minified React error #321
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webviz.